You are currently browsing comments. If you would like to return to the full story, you can read the full entry here: “Using sp_rename”.
You are currently browsing comments. If you would like to return to the full story, you can read the full entry here: “Using sp_rename”.
Derek,
Everything I’ve ever read cautions about using sp_rename and states a preference for dropping and re-creating. If I take that advice, how am I in a better position? I still have to go through the objects that reference via the old name and modify them.
Hi Mick,
From what I understand, the reason for dropping and recreating rather than performing sp_rename on an object is because sp_rename does not update the object reference in the sysobjects table. Rather, it simply changes a pointer. So basically it’s better to have an accurate sysobjects table. There’s probably a more technical explanation for it, but that’s essentially the idea.
Derek