Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Unconstrain/Reconstrain a table

By julianhaynes,

This script provides the DDL required to unconstrain and then reconstrain a table so that in between you can modify the tables contents without being hampered by referential integrity constraints a long the way.

Typical call:- utl_UnConstrain 'MyTable'

Total article views: 220 | Views in the last 30 days: 1