0

How to alter column in the existing table for the primary key and identity. I tried below query but showing Incorrect syntax near the keyword 'identity'.

alter table IAM_Software_Licence_Master
alter column SoftwareLicId int  identity(1,1) primary key

How can I achieve this..

Rajaram Shelar
  • 7,537
  • 24
  • 66
  • 107

1 Answers1

0

Its difficult to say what the issues are with changing this on your end as I do not know the table structure or whether or not this is used as a foreign Key. But the below link should give you everything you need: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/04d69ee6-d4f5-4f8f-a115-d89f7bcbc032/how-to-alter-column-to-identity11

OCDan
  • 1,103
  • 1
  • 10
  • 19