xiaohai2008的个人博客分享 http://blog.sciencenet.cn/u/xiaohai2008

博文

MySQL添加/删除一列

已有 5580 次阅读 2013-10-9 14:10 |个人分类:mysql|系统分类:科研笔记| add, column, drop

1、删除一列


mysql> alter table 表名 drop 列名;


2、添加一列


2.1 添加一列到表的最后

mysql> alter table 表名 add 列名 column specifications and constraints;


2.2 添加一列到表的开始

mysql> alter table 表名 add 列名 column specifications and constraints first;


2.3 添加一列到某列之后

mysql> alter table 表名 add 列名 column specifications and constraints after 列名;



https://wap.sciencenet.cn/blog-611051-731386.html

上一篇:MySQL重命名表名及列名
下一篇:A CRF-Based System for Recognizing Chemical Entities
收藏 IP: 168.160.24.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-20 00:24

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部