查詢外鍵並生產刪除語句

select 'alter table '+ o.name + ' drop CONSTRAINT ' + A.name from sys.foreign_keys A left join sys.all_objects o ON (A.parent_object_id=o.object_id) where A.name like '%create_by' or A.name like '%update_by' or A.name like '%send_by' or A.name like '%finish_by'code

相關文章
相關標籤/搜索