sql修改数据库中表的结构

ALTER TABLE TableName1
ADD | ALTER [COLUMN] FieldName1
FieldType [(nFieldWidth [, nPrecision])]
[NULL | NOT NULL]
[CHECK lExpression1 [ERROR cMessageText1]]
[DEFAULT eExpression1]
[PRIMARY KEY | UNIQUE]
[REFERENCES TableName2 [TAG TagName1]]
[NOCPTRANS]

例:ALTER TABLE customer ADD COLUMN fax c(20) NULL
posted @ 2014-02-03 11:18  起啥名都被占用  阅读(358)  评论(0编辑  收藏  举报