Tuesday, 3 January 2012

Foreign key references in Database

We can find the all the foreign key references by this in current database

SELECT a.name FKey,

               OBJECT_NAME(a.parent_object_id) ParentTable,

               OBJECT_NAME(a.referenced_object_id) RefTable

FROM   sys.foreign_keys a

 

Posted by: MR. JOYDEEP DAS

 

1 comment:

  1. hcf minecraft servers 100 I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.

    ReplyDelete