F-J-K
asked on
How to Auto-Increment Non-Primary Key? - MS SQL Server
CREATE TABLE SupplierQuote
(
supplierQuoteID int identity (3504,2) CONSTRAINT supquoteid_pk PRIMARY KEY,
PONumber int identity (9553,20) NOT NULL
.
.
);
I get this error:
Msg 2744, Level 16, State 2, Line 1
Multiple identity columns specified for table 'SupplierQuote'. Only one identity column per table is allowed.
How can i fix this error?
(
supplierQuoteID int identity (3504,2) CONSTRAINT supquoteid_pk PRIMARY KEY,
PONumber int identity (9553,20) NOT NULL
.
.
);
I get this error:
Msg 2744, Level 16, State 2, Line 1
Multiple identity columns specified for table 'SupplierQuote'. Only one identity column per table is allowed.
How can i fix this error?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
>>Only 1 Identity per table....you should probably have a different table named PO with the PO number as the identity column.
I think that's fastest way...
I wonder why only one column is allowed to be auto-incremented?
I think that's fastest way...
I wonder why only one column is allowed to be auto-incremented?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
ASKER
But PONumber int (9553,20) won't be auto-incremented, will it?