obsidian wrote:how do you mean "reorder"? are you simply talking about reordering the data in the table, or are you actually speaking of reordering the columns and schema of the table itself? if it's the latter, and you're only using this for a DB dump or export, consider simply creating a temp table and duplicating your data into that table (but in the right structure, or course) for export. once done, you can drop the temp table with no ill effect.
I'm talking about the logical structure of the table. I thought about using a temp table to dump to, dropping the original, then dumping from the temp table back into a new table (with the same name as the original) with the correct structure. In theory this would work and be pretty straight forward, would give virtually no down time, so this is certiainly and option. But since I only need to move one field, I was wondering if there was a more direct way.
I need to move a field called "Title" down in the order. I did this and functionally it worked. Now, I'm 100% self taught with all this stuff, so while it seems to have worked, is there any reason why it might be a bad idea to do this?
alter table tours add column temp varchar(255);
update table tours set temp = Title;
alter table tours drop column Title;
alter table tours add column Title varchar (10) after LastName;
update table tours set Title = temp;
alter table tours drop column templ