ALTER TABLE table_name
[WITH CHECK | NOCHECK]
ADD col_name type [{NULL | IDENTITY}]
[{, col_name type NULL | IDENTITY} ...]
DROP COLUMN col_name [{, col_name} ...]
ALTER COLUMN col_name type {NULL | IDENTITY}
[{, col_name type NULL | IDENTITY} ...]
ADD table_constraint
DROP table_constraint
16> CREATE TABLE sales
17> (order_no INTEGER NOT NULL PRIMARY KEY,
18> order_date DATETIME NOT NULL,
19> ship_date DATETIME NOT NULL)
20> GO
1>
2> ALTER TABLE sales
3> ADD CONSTRAINT order_check CHECK(order_date <= ship_date)
4> GO
1>
2> drop table sales;
3> GO
|