阅读背景:

mysql之字段的修改,添加、删除,多表关系(外键),单表详细操作(增删改)

来源:互联网 

字段的修改、添加和删除

create table tf1(

    id int primary key auto_increment,
    x int,
    y int

);

#修改
alter table tf1 modify x char(4) default'';
alter table tf1 change y m char(4) default '';

#增加
alter table 表名 add 字段名 类型[(长度) 约束];
>:alter table student add name char(4) first;
>:alter table student add age int unsigned after name;

#删除
alter table 表名 drop 字段名;
>: alter table student drop age;create table tf1(

    id int prim



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: