sql solace
Pages
Home
Dba 101
Dev 101
Indexes
SSIS
SSRS
Resources
Byte Calculator
SSMS
Community Contributions
Free Stuff
Saturday, July 2, 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:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment