This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Support for multiple schema names; drop all table constraints | |
-------------------------------------------------- | |
declare @name varchar(100) | |
declare @table varchar(100) | |
declare @schema varchar(100) | |
-- Drop all table constraints: this goes through alter table | |
declare c cursor for | |
select a.name as [constraint], b.name as [table], OBJECT_SCHEMA_NAME(b.id) as [schema] |