Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I must keep a table's columns as specified in a specification that changes quite often.

In MySQL Workbench, adding a new columns after all the others is easy, but I can't find a way to insert a new column where I want.
It is a problem, because I want to keep the columns ordered just like in the specification.

So I do it the painful way:

  1. Create the new column at the bottom
  2. Repeat Right-click-"Move up" tens of times to crawl my way up to the desired position

I am sure there is a more efficient way to achieve this?
Even a shortcut to avoid the right-click would save me a lot of time.

Thanks a lot!

alt text

share|improve this question

migrated from Jul 18 '12 at 9:09

This question came from our site for system and network administrators.

Add it using ALTER TABLE ADD ... FIRST? – pascal Jul 28 '10 at 8:57
As pascal says, mysql specifically allows this - but an important feature of a relational database is that neither column nor row order is implicitly maintained for a table. – symcbean Jul 28 '10 at 11:19
MySQL Workbench's .mwb file contains all of the database's design. If I use an SQL command, the column will be added in the database, but it will be overwritten/erased/replaced very soon. I want the columns info to be stored in the design file. I understand order is not important to the database engine, but order is somehow maintained by MySQL Workkbench, which is very convenient for maintainability. Thanks for the feedback! – Nicolas Raoul Jul 29 '10 at 1:07
up vote 2 down vote accepted

OK, I have found! It is so easy I am ashamed I didn't find earlier...

Plain old drag and drop.

share|improve this answer

![MySQL Software version: 5.5.27 -][1]

supporting adding columns at our desired places,under table->structure through GUI(Graphical User Interface)

share|improve this answer
Did you mean to create a link? – Nicolas Raoul Mar 7 '13 at 12:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.