增加列:alter table student add(stuPhone varchar(18));
删除列:alter table student drop column stuphone;
修改一列:alter table student modify(stuname varchar(12));//修改stuname列为12 字符修改表:
alter table student set unused column stuxxx;//把stuxxx设置为无用状态。
alter table student drop unused columns ;//此列已删除增加约束:
alter table student add constraint pk_stuno primary key(stuno);删除约束:alter table student drop constraint pk_stuno;
本文详细介绍了如何使用SQL命令进行数据库操作,包括增加、删除、修改列,设置及删除约束,以及理解数据库表的基本概念。

859

被折叠的 条评论
为什么被折叠?



