Skip to content

Instantly share code, notes, and snippets.

@matejskubic
Created August 2, 2016 08:58
Show Gist options
  • Save matejskubic/9a2c3292219d317c114244d248190a0b to your computer and use it in GitHub Desktop.
Save matejskubic/9a2c3292219d317c114244d248190a0b to your computer and use it in GitHub Desktop.
Drop all CONSTRAINTs
select
'ALTER TABLE [' + TABLE_NAME + '] DROP CONSTRAINT [' + CONSTRAINT_NAME + ']'
from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment