1ALTER TABLE {TABLENAME}
2ADD {COLUMNNAME} {TYPE} {NULL|NOT NULL}
3CONSTRAINT {CONSTRAINT_NAME} DEFAULT {DEFAULT_VALUE}
4WITH VALUES
5
1ALTER TABLE SomeTable
2 ADD SomeCol Bit NULL --Or NOT NULL.
3 CONSTRAINT D_SomeTable_SomeCol --When Omitted a Default-Constraint Name is autogenerated.
4 DEFAULT (0)--Optional Default-Constraint.
5WITH VALUES --Add if Column is Nullable and you want the Default Value for Existing Records.
1ALTER TABLE {TABLENAME}
2ADD {COLUMNNAME} {TYPE} {NULL|NOT NULL}
3CONSTRAINT {CONSTRAINT_NAME} DEFAULT {DEFAULT_VALUE}
4WITH VALUES
5
6example
7
8ALTER TABLE SomeTable
9 ADD SomeCol Bit NULL --Or NOT NULL.
10 CONSTRAINT D_SomeTable_SomeCol --When Omitted a Default-Constraint Name is autogenerated.
11 DEFAULT (0)--Optional Default-Constraint.
12WITH VALUES --Add if Column is Nullable and you want the Default Value for Existing Records.
13