2019独角兽企业重金招聘Python工程师标准>>> 
一、修改表名:
1:alter table `old_table` rename to `new_table`;
2:rename table `old_table` to `new_table`;
二、修改列的相关操作:
简单来说表创建完后一些更改表结构的操作都会是
alter table `table_name` operation[add,drop,change,modify,rename];
添加新列标准写法:alter table `table_name` add column `column_name` [other description];
添加新列简写法:alter table `table_name` add `column_name` [other description];
删除列标准写法:alter table `table_name` drop column `cloumn_name`;
删除列列简写法:alter table `table_name` drop `cloumn_name`;
最后
以上就是机智哈密瓜最近收集整理的关于mysql列操作:添加、删除、重命名、修改列属性的全部内容,更多相关mysql列操作内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复