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 |
|
fmardani
Constraint Violating Yak Guru
433 Posts |
Posted - 2005-08-25 : 06:46:14
|
| Hi,What is the sql to drop the identity from a field.I use this sql but the error is "Incorrect syntax near the keyword 'identity'."alter table UM_TB_NOTE_HISTORYalter column ID_NoteHistory int identity(1,1) not nullThanks |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-25 : 07:17:28
|
| Do you want to drop the identity property or add it to the existing column?MadhivananFailing to plan is Planning to fail |
 |
|
|
fmardani
Constraint Violating Yak Guru
433 Posts |
Posted - 2005-08-25 : 07:25:32
|
| Hi,stage 1: drop identity from the fieldstage 2: add an identity to the fieldThanks |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-25 : 07:30:57
|
| I think the only way is to do this from Enterprise ManagerOtherwise Create new table with identity and other fields and copy the data from old table and drop old table and rename new tableMadhivananFailing to plan is Planning to fail |
 |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2005-08-25 : 10:03:53
|
| "set identity_insert dbo.tablename on" will disable the identity property....if this is enough to satisfy the IT objective. |
 |
|
|
|
|
|