Hi,
I have a table with a column that needs the data type upgrading. However running any alter script causes errors due to a unnamed unique constraint.
I need to drop this constraint but unfortunately I do not know the name. I have a script which currently lists all the unique constraints on the table but I need to find out how to go that one step further and associate the constraint names with the columns.
Select *
From sysobjects
Where sysobjects.xtype = 'UQ' AND sysobjects.parent_obj= OBJECT_ID(N'Users')
this returns
UQ__Users__45F365D3
UQ__Users__46E78AOC
I need to know which columns theses are linked to in order to delete the right one. I need to support SQL 2000, 2005, and 2008.
Any suggestions would be appreciated.
Thanks Ben