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 |
|
amirs
Constraint Violating Yak Guru
260 Posts |
Posted - 2010-10-09 : 11:27:04
|
| Dear memberplease tell me how to remove identity column in the table by script in the SQL2008. |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-10-09 : 13:17:30
|
| [code]ALTER TABLE tableNameHere DROP COLUMN columnNameHere[/code]If the column is indexed, or referenced by a key, you will first need to drop the index/key |
 |
|
|
amirs
Constraint Violating Yak Guru
260 Posts |
Posted - 2010-10-09 : 14:11:39
|
| thanks to replaybut colomn is not null or blank it is some value.i will not delete colomn value. i will remove only idetity |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-10-09 : 15:22:56
|
| either add a new column, copy the values to it and drop original, or create a new table and pump all the data to the new table, drop old, rename new table to original name |
 |
|
|
|
|
|