Can We Create Identity Column to the Existing Table

You can’t alter the existing columns for identity. You have 2 options, Create a new table with identity & drop the existing table. Create a new column with identity & drop the existing column.

How do I add an identity column to an existing table in SQL?

  1. Get the script to create the table along with the data, using ‘Generate Scripts’ option.
  2. Add identity to the generated script.
  3. Drop the existing table and run the generated script.

How do I add a column to an already created table?

The ALTER TABLE statement is used to add, delete, or modify columns in an existing table. The ALTER TABLE statement is also used to add and drop various constraints on an existing table.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest