Click here to Skip to main content
15,306,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HOW TO ADD A IDENTITY SPECIFICATION TO THE 2 COLUMNS IN A SINGLE TABLE IS IT POSSIBLE?

FOR EX:

IN MY TABLE 3 COLUMNS

ID INT - AUTO INCREMENT

NAME VARCHAR(100)

RANK INT - AUTO INCREMENT

I WANT TO SET A ID & RANK ALSO TRY TO SET THE IDENTITY SPECIFICATION IS YES IT CONSIDER ONLY 1 SPECIFICATION HOW TO ADD A 2 OR MORE SPECIFICATION ...

ANY PLEASE HELP ME

THANKS ,
ANIL
Posted
Comments
[no name] 23-Apr-13 8:27am
   
Why are you screaming at us?

No, you can't have two identity columns.
   
Comments
StianSandberg 23-Apr-13 8:37am
   
But you can have two primary keys!
Tharaka MTR 23-Apr-13 8:46am
   
yes, you can have two primary keys. But can't have two identity columns
gvprabu 23-Apr-13 9:33am
   
2 primary key means... One table have only one PK right
Only one identity column can be created per table.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900