I have table created and want to alter that table. I want to add a primary key and identity(1,1).
I can apply primary key but applying identity gives error. Is anything missing?
ALTER TABLE MyTable ADD PRIMARY KEY (Id)
How can I add identity as well with primary key?