You cannot remove an IDENTITY
specification once set.
To remove the entire column:
ALTER TABLE yourTable
DROP COLUMN yourCOlumn;
Information about ALTER TABLE here
If you need to keep the data, but remove the IDENTITY
column, you will need to:
- Create a new column
- Transfer the data from the existing
IDENTITY
column to the new column
- Drop the existing
IDENTITY
column.
- Rename the new column to the original column name
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…