Cornelia Yoder
asked on
MySQL order by List
Is there any way to give a sort order by list in MySQL?
Something like
SELECT * FROM Table ORDER BY Id=(2,4,3,1,5)
effectively sorting the results in that order of ID value?
Something like
SELECT * FROM Table ORDER BY Id=(2,4,3,1,5)
effectively sorting the results in that order of ID value?
Select * From Table ORDER BY Table.ID ASCENDING
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, guys!
I guess I don't get why I was assisted. I linked to the exact same answer the person after me gave. Just because I dind't copy and paste it I'm "assisted"? That doesn't strike me as assisted.
ASKER
The answers were essentially the same, at approximately the same time. I split the points evenly. Is there some advantage to being the Accepted vs Assisted answer?