How to find foreign key for a given table in sql server 2005
-
Hi How to find foreign key for a given table in sql server 2005. exec sp_fkeys @pktable_name='authors' //It is working fine in sql 2000 But the same is not working for 2005. exec sp_fkeys @pktable_name='[Production].[Product]' also I tried exec sp_fkeys @pktable_name='[Test].[Production].[Product]' Can any one help me please kesavan
-
Hi How to find foreign key for a given table in sql server 2005. exec sp_fkeys @pktable_name='authors' //It is working fine in sql 2000 But the same is not working for 2005. exec sp_fkeys @pktable_name='[Production].[Product]' also I tried exec sp_fkeys @pktable_name='[Test].[Production].[Product]' Can any one help me please kesavan
Try this:
sp_fkeys @PKTable_name = N'Product', @PKTable_owner = N'Sales'
(This, of course, assumes that you have a product table in a Sales schema).
Deja View - the feeling that you've seen this post before.
-
Try this:
sp_fkeys @PKTable_name = N'Product', @PKTable_owner = N'Sales'
(This, of course, assumes that you have a product table in a Sales schema).
Deja View - the feeling that you've seen this post before.