You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- 1. Just the object name as seen in sys.objects:
sp_rename 'FK_Product_Caetgory', 'FK_Product_Category', 'OBJECT'-- 2. Qualified with the schema:
sp_rename 'Shopping.FK_Product_Caetgory', 'FK_Product_Category', 'OBJECT'-- 3. Qualified with the schema and table:
sp_rename 'Shopping.Product.FK_Product_Caetgory', 'FK_Product_Category', 'OBJECT'
List all whose name doesn't have prefix "FK_"
selectfk.table_name, fk.constraint_namefrominformation_schema.referential_constraints rc
inner joininformation_schema.table_constraints fk
onrc.constraint_name=fk.constraint_namewherefk.constraint_name not like'FK[_]%'