📜  sql 添加具有默认值的列 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:22.780000             🧑  作者: Mango

代码示例6
ALTER TABLE SomeTable
        ADD SomeCol Bit NULL --Or NOT NULL.
 CONSTRAINT D_SomeTable_SomeCol --When Omitted a Default-Constraint Name is autogenerated.
    DEFAULT (0)--Optional Default-Constraint.
WITH VALUES --Add if Column is Nullable and you want the Default Value for Existing Records.