I have the following table:
Table : Test1
create table test1
(
ID int
);
Note: I have a data on this table and I don't want to lose it.
Now I want to alter the column data type to INT IDENTITY for which I am using the following script.
My Try:
ALTER TABLE test1
ALTER COLUMN ID INT IDENTITY(1,1);
Which is throwing an error:
Incorrect syntax near the keyword 'IDENTITY'.