OrderID and ProductID in my OrderID table, for example, act as a single primary key. I'm just not sure how to do this with SQL.
Example:
CREATE TABLE [Order Details]
(
[OrderID] [int] IDENTITY(1,1) NOT NULL,
[ProductID] [int] NOT NULL,
...
)
Can I simply add PRIMARY KEY to both lines after NOT NULL to make them both the primary key?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…