Add a new table column to specific ordinal position in Microsoft SQL Server

You have to create a temp table that mirrors the original table’s schema but with the column order that you want, then copy the contents of the original to temp. Delete the original and rename the temp.

This is what SQL Management Studio does behind the scenes.

With a schema sync tool, you can generate these scripts automatically.

Leave a Comment