HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

In MySQL Workbench, insert a new column at the "top" of a table?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
theinsertnewworkbenchcolumntopmysqltable

Problem

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:

  • Create the new column at the bottom



  • 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, with the GUI rather than writing SQL code?

Even a shortcut to avoid the right-click would save me a lot of time.

Solution

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

Plain old drag and drop.

Just add the column at the bottom, then move it with your mouse to the position you want.

Context

StackExchange Database Administrators Q#21057, answer score: 3

Revisions (0)

No revisions yet.