Welcome to the OzoneAsylum FaqWiki
Frequently Asked Questions
Server Side Coding
MySQL

Can I order/reorder fields in a table in MySQL? Pages that link to <a href="https://ozoneasylum.com/backlink?for=5475" title="Pages that link to Can I order/reorder fields in a table in MySQL?" rel="nofollow" >Can I order/reorder fields in a table in MySQL?\

Yes although it is not an operation for the faint-hearted (hopefully MySQL administartion code will automate this kind of operation).

Basically you need to create a nother table to store the data in while you destroy the current table and then rebuild it again and put the data back in the order you want. That description makes it sound more complex than it needs to be - see the examples below for more details:

--------------------------------
Relevant links:

Order of fields

Moving Fields Around

MySQL Manual: 6.5.4 ALTER TABLE Syntax - might also prove useful.

products

Mascon - seem to offer a free version which will reorder tables.

EMS MySQL Manager - appears to be able to do this (although it isn't free).

________________________
Emperor

(Added by: Emperor on Thu 12-Dec-2002)

« BackwardsOnwards »

Show Forum Drop Down Menu