Home » Archive

Articles tagged with: ms sql

Programming »

[28 Jul 2009 | No Comment | ]

It’s pretty simple. Just run the following SQL statement on the database you are working on:
SELECT * FROM Information_Schema.TABLE_CONSTRAINTS
WHERE TABLE_NAME = ‘mytable’ AND CONSTRAINT_TYPE = ‘foreign key’
As you can see, this query can be used also for looking other CONSTRAINTS.