I am using the Object Explorer in SQL Server Management Studio. I am interested in what the keys are for a certain table.
When I go to the table and display the keys I see two different colored icons. One is a yellow key icon that identifies the primary key for the table . The second is a grey colored key. Can someone tell me what this grey key is identifying?
grey key icon stands for foreign key relationship. those are columns which are related via foreign key relationship to another tables primary key. Right click on any one of them and choose script as option and you'll get create script for foreign key.
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/