Saturday 2 July 2011

TSQL : Renaming Foreign Keys

I ran into this today, and found Richard Dingwall's blog post where he had found the same.

If you need to rename a foreign key -
Qualify the foreign key name by prefixing it with the schema name.

sp_rename 'Shopping.FK_Product_Caetgory', 'FK_Product_Category', 'OBJECT'



No comments: