Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I hv a database table book_ticket with columns tkt_no as primary key,
Now i want to autoincrement for that column without dropping the same column as it it referenced to other tables.
this is my table script..

CREATE TABLE book_ticket 
(
tkt_no  int  PRIMARY KEY,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255)
)

plz help me out. thanks in advance.
Posted

1 solution

You can't.
There are some workarounds, you can find some examples here:
How to alter column to identity(1,1)[^]
 
Share this answer
 

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