oracle
语法结构如下:
alter table tablename add (column datatype [default value][null/not null],….);
alter table tablename modify (column datatype [default value][null/not null],….);
alter table tablename drop (column);
例子:
增加列
alter table tablename add USR_EmailValidate CHAR(1) default 'N' not null;
修改列
alter table tablename modify USR_EmailValidate CHAR(1) default 'Y' null;
删除列
alter table tablename drop column USR_EmailValidate;
增加约束
alter table user
add constraint FK_user_CLIENT foreign key (COMP_ID)
references T_stal (COMP_ID);
删除约束
alter table user drop constraint FK_user_CLIENT ;