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.
Author |
Topic |
vb03
Starting Member
1 Post |
Posted - 2007-03-26 : 08:04:01
|
Is it possible to change a non identity column to identity column without dropping the column using query analyser?Any one can help me regarding this issue? |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-03-26 : 08:57:26
|
Well you can use management studio but it will do the same thing.It's not possible to add an identity property to an existing column.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
spejbl
Starting Member
28 Posts |
Posted - 2007-03-26 : 09:01:32
|
You cannot use ALTER TABLE to change a column into IDENTITY column. One way is to rename the table, createa new and move over the data. You need to have SET IDENTITY_INSERT on for the table when you move the data.You can also do it in Enterprise Mangager (Management Studio) - which will renamed and move data behind the scenes.kbhttp://kbupdate.info/ | http://suppline.com/ |
 |
|
|
|
|