Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello .... first i added 10 data ,then i deleted order no 10th data,and again i added one order. the order no set id1,2,3,4,5,6,7,8,9,_?_11 how to rearrange this
Posted

If your column is Auto incremented that is "Identity" then you can not rearrange it.
cause it's a primary inseration and value can not be repeat.
 
Share this answer
 
Hi ,

You can rearrange by drop the column from table and re creating it.

Eg.
SQL
ALTER TABLE tablename
DROP COLUMN columnname
alter table tablename add columnname int identity(1,1)




regards,
Pal
 
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