Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Answers
SalesOrderDetail table AdventureWorks2008R2 Primary Keys
Rodney Johnson
12y
2.1k
1
Reply
Hello,
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
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Index Configurations of Table
Shape in SQL Server