changing order in table in db
is it possible to change the order of the cols in the table whilst there is data in it. (mysql db)
ie. my table is id, col_1, col_2, col_3 and I want it to be id, col_1, col_3, col_2
I thought that I could create a new table with the cols in the correct order then copy the data across to it - but it stays in the same order! heres the code:
insert into [newtable] (id, col_1, col_3, col_2) select * from [oldtable];
Now I know that I want to specify which order using insert values etc but can't seem to figure the workaround.
By the way if it sounds a really dum thing to do - I agree but my clients wants it done and asap also :D