Add a column with a default value to an existing table in SQL Server

后端 未结 30 2219
轮回少年
轮回少年 2020-11-22 12:00

How can I add a column with a default value to an existing table in SQL Server 2000 / SQL Server 2005?

30条回答
  •  逝去的感伤
    2020-11-22 12:11

    ALTER TABLE tbl_table ADD int_column int NOT NULL DEFAULT(0)
    

    From this query you can add a column of datatype integer with default value 0.

提交回复
热议问题