Hi All, Can anybody tell me how to find the definition of all the constraints on a particular table? My requirement is to find out all the tables referring a particular table through foreign key. sp_helpconstraint can show me the names of the constrains but not the definition. Regards, amitm79
sp_help has a result set for this. If you need a more elegant way they you could grab the text for sp_help and cut out the bits you don't want, rename it and save it under this different name Cheers Twan
Another option is to use INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE INFORMATION_SCHEMA.CONSTRAINT_TABLE_USAGE or maybe some other INFORMATION_SCHEMA stuff you can find in BOL Frank http://www.insidesql.de http://www.familienzirkus.de