-
Composite Key on Table Data Type
I am trying to add indexes to my table data types and have realized that I can only add primary keys. So, I am hoping there is a way to add a composite primary key, but I am not having any success. I have tried the following:
Declare @Sales TABLE
(SaleID INT IDENTITY(100000,1),
SalesRegion CHAR(2),
CONSTRAINT ID_PK PRIMARY KEY (SaleID,SalesRegion))
Any suggestions would be appreciated.
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|