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

后端 未结 6 1157
后悔当初
后悔当初 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:24

    ALTER won't do it because column order does not matter for storage or querying

    If SQL Server, you'd have to use the SSMS Table Designer to arrange your columns, which can then generate a script which drops and recreates the table

    Edit Jun 2013

    Cross link to my answer here: Performance / Space implications when ordering SQL Server columns?

提交回复
热议问题