我想更改数据库表的列位置而不丢失数据。
例如:
当前表:
+----+------+-------+----------+ | id | name | email | password | +----+------+-------+----------+
到
+----+----------+------+-------+ | id | password | name | email | +----+----------+------+-------+
试试这个:
ALTER TABLE table_name MODIFY password varchar(20) AFTER id