>From: Ranjeet Walunj [mailto:ranjeet.walunj@stripped]
>Sent: Wednesday, July 30, 2008 3:55 PM
>To: Jerry Schwartz
>Subject: Re: Re-arranging fields
>Jerry Schwartz wrote:
>> Is there any reasonable way of re-arranging the order of columns in a
>> without losing their data? The best I could come up with was to copy
>> table, empty it, and then do an INSERT . SELECT specifying the new
>> the fields.
>This can also be achieved in following manner.
>a) Rename table to tablename_new
>b) create table Tablename (fieldnames and datatypes) Select
>field1,field2...fieldn from tablename_new;
[JS] Yes, that would work. I should have thought of it myself.
>But why do you want to do it in first place ?
[JS] I added a dozen or so columns for a special purpose, and although MySQL
doesn't care I wanted them in a certain order that would be intuitive to a
user / programmer.