I need to programmatically remove a batch of unique constraints that I don't know the names of.

Posted by Bill on Stack Overflow See other posts from Stack Overflow or by Bill
Published on 2010-06-08T20:39:00Z Indexed on 2010/06/08 20:42 UTC
Read the original article Hit count: 140

Filed under:
|
|
|

I maintain a product that is installed at multiple locations which as been haphazardly upgraded. Unique constraints were added to a number of tables, but I have no idea what the names are at any particular instance. What I do know is the table/columnname pair that has the unique constraints and I would like to write a script to delete any unique constraint on these column/table combinations. This is MSSQL 2000 and later. Something that works on 2000/2005/2008 would be best!

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server