ITPub博客

首页 > Linux操作系统 > Linux操作系统 > mysql 表基本管理

mysql 表基本管理

原创 Linux操作系统 作者:sieper 时间:2009-12-11 15:41:13 0 删除 编辑

修改表名

alter table tabA rename to newname;

修改列类型:有限制的修改

alter table tabA modify columnname newtype;

比如int  ->varchar

alter table test modify id varchar(128);

删除列:时期为空后

alter table tabA drop column columnname;

添加列:

alter table tabA add column colName;

 

 

修改列名

alter table clob_value change column value2 value text;

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11813230/viewspace-622229/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-03-17

  • 博文量
    87
  • 访问量
    210540