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
 General SQL Server Forums
 New to SQL Server Programming
 ALTER TABLE APLLYING IDENTITY CONSTRAINT

Author  Topic 

yaman
Posting Yak Master

213 Posts

Posted - 2008-04-09 : 03:08:29

Pls help me

i want to alter table and add identinty constraint on one column

create table play8(id int)
" alter table play8
alter column id int identity(1,1) " GIVES ERROR or it is posibble


Yaman

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-04-09 : 03:24:42
It is not possible to alter the column to have identity property. Instead create new column with identity,drop old column and rename new column to old column's name

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -