I need a SQL query which add a new column after an existing column, so the column will be added in a specific order.
Please suggest me if any ALTER quer
First add the new column to the old table through SSMStudio. Go to the database >> table >> columns. Right click on columns and choose new column. Follow the wizard. Then create the new table with the columns ordered as desired as follows:
select * into my_new_table from (
select old_col1, my_new_col, old_col2, old_col3
from my_old_table
) as A
;
Then rename the tables as desired through SSMStudio. Go to the database >> table >> choose rename.