CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of constraint
SQL
 
alter table Table1
add constraint FK_Table1_Table2 FOREIGN KEY ( Fk_Table1Column ) references Table2(PK_Table2Column)
by Egli   September 29, 2011 @ 5:48am
50 Views
no comments
 
SQL
-- Disable All constraint (FK)
EXECUTE sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT ALL"
GO
 
-- Enable
EXECUTE sp_msforeachtable "ALTER TABLE ? WITH CHECK CHECK CONSTRAINT ALL"
GO
by Tareq Saleh   April 10, 2010 @ 1:33am
286 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate