SQL Query to add a new column after an existing column in SQL Server 2005

后端 未结 6 1144
后悔当初
后悔当初 2020-12-28 11:34

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

6条回答
  •  情话喂你
    2020-12-28 12:16

    It's possible.

    First, just add each column the usual way (as the last column).

    Secondly, in SQL Server Management Studio Get into Tools => Options.

    Under 'Designers' Tab => 'Table and Database Designers' menu, uncheck the option 'Prevent saving changes that require table re-creation'.

    Afterwards, right click on your table and choose 'Design'. In 'Design' mode just drag the columns to order them.

    Don't forget to save.

提交回复
热议问题