TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rodney Johnson
NA
80
0
SalesOrderDetail table AdventureWorks2008R2 Primary Keys
Aug 22 2012 11:15 AM
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
Reply
Answers (
4
)
Index Configurations of Table
Shape in SQL Server