So far I've tried to modify the field with:
ALTER TABLE items ALTER COLUMN Item_ID int Identity(1,1)
but it doesn't work.
I have done some research on Google, but cannot solve it yet.
So far I've tried to modify the field with:
ALTER TABLE items ALTER COLUMN Item_ID int Identity(1,1)
but it doesn't work.
I have done some research on Google, but cannot solve it yet.
You did not mention that whether the items
column already exists, or not. If it does,
you cannot add identity constraint for the existing column.
I believe that you have to create a new column using this query:
ALTER TABLE items
ADD Item_ID int IDENTITY (1, 1)