Add Column on SQL Server on Specific Place?

前端 未结 9 1620
-上瘾入骨i
-上瘾入骨i 2021-01-19 02:12

I would like to know if there\'s a way to add a column to an SQL Server table after it\'s created and in a specific position??

Thanks.

9条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-19 02:35

    As Kane says, it's not possible in a direct way. You can see how Management Studio does it by adding a column in the design mode and checking out the change script.

    If the column is not in the last position, the script basically drops the table and recreates it, with the new column in the desired position.

提交回复
热议问题