Page 1 of 1

[Solved] reordering of fields in a table??

Posted: Thu Oct 20, 2005 10:43 am
by waskelton4
is it possible to reorder the fields in a table?

i have some tables that have no logical order to how the fields are displayed and it makes browsing them a little more difficult..

can it be done?

ws

Posted: Thu Oct 20, 2005 4:44 pm
by timvw
The entities in a database table are unordered per definition...

Offcourse, you can use the ORDER BY clause to order the entities returned from a query...

Posted: Thu Oct 20, 2005 4:48 pm
by waskelton4
actually,

not 5 minutes before your reply posted.. i found a "re-order columns" command in the SQLyog Enterprise edition GUI i've been trying out.

It worked like a charm.
not only did it reorder the columns when i few the table in it.. but also in mysqlCC

havne't tried to "show tables" at command line.. maybe tomorrow..

Thanks for the reply..

Will

Posted: Fri Oct 21, 2005 3:33 pm
by timvw
Must admit that i didn't read your question well.. So i confused fields/columns with records/rows.

http://dev.mysql.com/doc/refman/5.0/en/ ... order.html

[SOLVED] - reordering of fields in a table??

Posted: Fri Oct 21, 2005 3:49 pm
by waskelton4
thanks for the link..

I guess it actually has to re-write the whole table according to the documentation..

the first user comment down there shows another way that looks better.. wonder if it works.. :)

Thanks again

Will