How to move columns in a MySQL table?
问题 Currently I am having the following MySQL table: Employees (empID, empName, department); I want to change the table to the following: Employees (empID, department, empName); How can this be done using ALTER statements? Note: I want to change only column positions. 回答1: If empName is a VARCHAR(50) column: ALTER TABLE Employees MODIFY COLUMN empName VARCHAR(50) AFTER department; EDIT Per the comments, you can also do this: ALTER TABLE Employees CHANGE COLUMN empName empName VARCHAR(50) AFTER