标签:sig 缺点 存在 efault 方案 course 有关 var 很多
-- 增加主键 create table my_pri( id int primary key, name varchar(20) not null comment ‘姓名‘ )charset utf8;
create table my_pri2( number char(10) comment ‘学号‘, course char(10) comment ‘课程代码:3901+0000‘, score tinyint unsigned default 60 comment ‘成绩‘, -- 增加主键限制:学号和课程代码应该是唯一的 primary key (number,course) )charset utf8;
alter table 表名 add primary key (字段列表);
drop table 表名 drop primary key;
-- 修改表选项的值 alter table 表名 auto_increment = 值;
-- 不建议修改 set auto_increment_increment = 5;
alter table 表名 modify 字段 类型;
标签:sig 缺点 存在 efault 方案 course 有关 var 很多
原文地址:http://www.cnblogs.com/xuweiweiailixing/p/7402347.html