Monday, March 19, 2012

ALTER TABLE ... IDENTITY question....

Hi,
I am trying to programatically change the seed of an existing IDENTITY
column (Copy_ID). When I run the following command I get the error:
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'IDENTITY'.
ALTER TABLE Copy ALTER COLUMN Copy_ID Int IDENTITY (1,1);
Where am I going wrong?
Thanks in advance,
StuCheck out DBCC CHECKIDENT in the BOL.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Stu" <s.lock@.cergis.com> wrote in message
news:uGBp9R1RGHA.5500@.TK2MSFTNGP12.phx.gbl...
Hi,
I am trying to programatically change the seed of an existing IDENTITY
column (Copy_ID). When I run the following command I get the error:
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'IDENTITY'.
ALTER TABLE Copy ALTER COLUMN Copy_ID Int IDENTITY (1,1);
Where am I going wrong?
Thanks in advance,
Stu

No comments:

Post a Comment