添加列
##(1)添加列:添加一列(添加一个字段)
##给用户表t_user add balance double(5,2);
##修改列类型 性别的数据类型改成int(0:男,1:女,2:未知)
alter table t_user modify sex int(1);
删除列
##删除列 把t_user表的balance字段删除
alter table t_user drop balance;
修改列名
##修改列名 把t_user表,手机字段phone改成tel
alter table t_user change phone tel varchar(12)
修改表
##(5)修改表(重命名)的名字 t_user ->tb_user;
rename table t_user to tb_user;
文章转载自周周小心得,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




