Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Alter table command

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2011-08-29 : 10:52:36
I am trying to use the following to alter the column from INT not null to an dentity column.
Getting error incorrect syntax near idnetity.

ALTER TABLE TABLE_RM ALTER COLUMN RMID [int] IDENTITY(1,1) NOT NULL;

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-29 : 11:00:02
you cant alter a column to be of identity type. see below
http://www.mssqltips.com/sqlservertip/1397/add-or-drop-identity-property-for-an-existing-sql-server-column/

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -