79700323

Date: 2025-07-13 23:56:29
Score: 1
Natty:
Report link

If there is an old identity column, you need to drop the old index first.

ALTER TABLE <table_name> DROP CONSTRAINT <index_name>;
Alter table <table_name> add <column_name> INT IDENTITY;
ALTER TABLE <table_name> ADD CONSTRAINT <index_name> PRIMARY KEY NONCLUSTERED (<column_name>);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: crane