I am working through the Beginning Microsoft® SQL Server® 2008 Programming text. I have an understanding a table can have only one primary key. However, it appear the SalesOrderDetail table has two: the SalesOrderID and the SalesOrderDetailID. Below is a screen shot of the table columns.
I recognize the SalesOrderID is a is a foreign key to the SalesOrderHeader table. However, it appears, by the coloring of the key and the PK in (PK, FK, int, not null) , that it is also a primary key for this table. Can someone help me understand this? Is it that the PK in the column definition refers to the fact it is a primary key in another table? If so, why is it gold colored in this table?
Thanks
Javeed M ShaikhPosted Aug 22, 2012, 11:30 AM
Rodney JohnsonPosted Aug 22, 2012, 12:19 PM
Javeed M ShaikhPosted Aug 22, 2012, 12:01 PM
Rodney JohnsonPosted Aug 22, 2012, 11:51 AM