Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to add a column which has autogenerate value at design time of table in sql 2005
Posted
Comments
member60 15-Nov-11 0:44am    
check the tags u added

Hi,
To set the identity value of the column as YES.
 
Share this answer
 
Auto generated column has datatype as Interger always.
if you have table and you just want to add column then run the following Query

alter table TABLENMAE add COLUMNNAME int identity(1,1)


where identity is for the autoincrement of column and 1 is the autoincrement seed.
 
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