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

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -