Jump to content

Archived

This topic is now archived and is closed to further replies.

Ninjakreborn

reorganizing fields.

Recommended Posts

How do you reorganize fields in a table
I have 4 fields, and I want to make the 3rd field up to where the 1st is, it was my primary, I want my primary on top but have never had to change them around before.

Share this post


Link to post
Share on other sites
I think that's under the ALTER TABLE syntax in the MySQL manual.  There's an option, FIRST|AFTER [COLUMN] that should allow you to switch things around.

Share this post


Link to post
Share on other sites
I doubt that you can actually "move" columns without re-creating them and copying over the data.

Share this post


Link to post
Share on other sites
Is there any technical benefit to changing the order of the fields?  Why would anyone care "what's on top"?  Sounds like a disaster in the making to me.

Share this post


Link to post
Share on other sites
Agreed... which explains why there's no ability to do so.  Personally, I like the UID first, but who actually cares?  There is so little to be gained by a specific order that it's totally irrelevant.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.