Thanks for your comment but as I said I do not want to get a list of relation between all tables. What I need is simply identifying parent of A Specified Table like 'Stores' in pub.
Thanks any way
Just add to the "Where" clause and specify your table name as needed.
Or, you could just turn the referenced parent/child around like so:
SELECT object_name(referenced_object_id)As 'Parent'
WHERE object_name(parent_object_id) ='Stores'
The trick here is that if you look at the sys.foreign_keys view definition, the column "referenced_object_id" points to the parent end of the relationship. The column "parent_object_id" points to the owner of the relationship (the "child" end).