tags:

views:

595

answers:

4

Following statement can reset seed

DBCC CHECKIDENT ('TableName', RESEED, 1)

but this time I have to change its increment .

+3  A: 

Hope this helps

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

Code from ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/ssmprog3/html/5719d3e4-14db-4073-bed7-d08f39416a39.htm

petergo
+1 Editted for clarity
Dead account
this is a 'documentation' bug. suggested syntax will fail. you cannot ALTER the increment value for an identity. you must drop/re-create the column or table
Nick Kavadias
A: 
Aleris
A: 

The following SQL statement does not work

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

Can you give correct syntax ?

kavitha
A: 

Was the T-SQL for this determined? The SQL statement originally posted by petergo and edited by Ian Quigley doesn't work for me, either. I get "Incorrect syntax near the keyword 'IDENTITY'." and adding the column data type to the alter statement doesn't help.

Karen Wallace