Mysql语句:删除/添加一列数据,修改一项数据

删除一列数据

alter table 表名 drop column 列名

注:在主流数据库下,删除列的语法是一致的,并无差别。

添加一列数据

alter table 表名 add 列名 数据类型

eg: alter table mytable add mycol int(11);

修改一项数据

update mytable set mycol=mydata where 条件;

posted @ 2016-04-15 11:23  Carolina  阅读(1542)  评论(0编辑  收藏  举报