Problem with Identity increment Value

  • Hi,

    I want to change the Identity increment value of a column, I Tried with the following command,it returns error message --- 'Incorrect syntax near the keyword 'IDENTITY'.

    ALTER TABLE MyCustomers ALTER COLUMN CustId IDENTITY (200, 2);

    Expecting your ideas to solve this problem

    Thanks and Regards,

    Rajesh

  • You'll need to rebuild the table. Create a new table with the identity seed and increment set to what you want, insert data from the original table, drop the the original table, and rename the new table.

    Greg

  • you have to do what Greg suggested.

  • Thanks Greg,

    I did that and worked fine

    Thanks and regards,

    Rajesh

  • Thanks steve,

    I did the same and it worked fine

    Regards,

    rajesh

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply