To find the constraints for a given database column (without using the built-in SQL Managament Studio features) run the following SQL:
SELECT OBJECT_NAME(constid) FROM sysconstraints WHERE id = OBJECT_ID('table name here') AND colid = ( SELECT colid FROM syscolumns WHERE id = OBJECT_ID('table name here') AND name = 'column name here' )
0 comments:
Post a Comment
By all means leave a comment. I may not be able to get back to you as quickly as I'd like but I'll do my very best.