本文介绍了重新排序列的简单方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在研究一个数据库.在大多数表上,列顺序不是我所期望的,我想更改它(我有权限).例如,primary_key 的 id
列很少是第一列!
I'm working on a database. On most of the tables, the column order is not what I would expect, and I would like to change it (I have the permission). For example, the primary_key's id
columns are rarely the first column!
是否有使用 phpMyAdmin 移动列的简单方法?
Is there an easy method of moving columns with phpMyAdmin?
推荐答案
使用 ALTERTABLE ... MODIFY COLUMN 语句.
ALTER TABLE table_name MODIFY COLUMN misplaced_column INT(11) AFTER other_column;
这篇关于重新排序列的简单方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!