Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Lookup tables

Author  Topic 

ahsan19
Starting Member

7 Posts

Posted - 2006-11-08 : 16:58:05
I have about 100 lookup tables in a database and I want to identify the keys (used by other core tables) to look up those tables up. How can I go about finding those keys?

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-11-08 : 17:21:53
As long as you have primary and foreign keys defined you can use the system tables or these views to get all the info you want.
information_schema.referential_constraints
information_schema.key_column_usage
Go to Top of Page
   

- Advertisement -