Add a IDENTITY to a column in SQL SERVER 2008 -


create table stud( student_id int primary key, student_name varchar(30), student_surname varchar(12), student_initial varchar(10)) 

i had created table stud. want add identity student_id column using alter query

alter table stud alter column student_id int identity    

i error

incorrect syntax near keyword 'identity'.

alter table mytable   add id int identity(1,1) not null 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -