Instead of alter table column to turn IDENTITY on and off, turn IDENTITY_INSERT on and off
- by Kevin Shyr
First of all, I don't know which version of SQL this post (http://www.techonthenet.com/sql/tables/alter_table.php) is based on, but at least for Microsoft SQL Server 2008, the syntax is not:
ALTER TABLE [table_name]
MODIFY [column_name] [data_type] NOT NULL;
Instead, it should be:
ALTER TABLE [table_name]
ALTER COLUMN [column_name] [data_type] NOT…