Home  >  Article  >  Database  >  mysql移动列的顺序sql语句_MySQL

mysql移动列的顺序sql语句_MySQL

WBOY
WBOYOriginal
2016-06-01 13:42:491948browse

bitsCN.com
mysql数据库工具好像没有调表列顺序的功能,但是我们可以通过sql语句实现。 语句: 引用alter table 表名 modify 字段名 字段类型 after 字段 举例: 1、把user_name列移动到password后面: Java代码      alter table employee modify user_name varchar(100) after password;   2、把user_name列移动到最前面: Java代码  alter table employee modify user_name varchar(100) first;      作者 hanxin830311 bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn