Link to home
Start Free TrialLog in
Avatar of coolispaul
coolispaulFlag for United States of America

asked on

How to retrieve fields in mysql in certain order

Hi

I have a database structure with fields in the database in this order:

ID
Name
Surname
Address
Town

How, do i retrieve using a select statment in say this order:
ID
Name
Town
Surname
Address
ASKER CERTIFIED SOLUTION
Avatar of Nem Schlecht
Nem Schlecht
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of skillszone
skillszone

SELECT ID, Name, Town, Surname, Address
FROM TableName;

Don't need to care about the column order in tables. Always feel free to change the order in query.