I have a table with 2 columns
id status
1 SUBMIT
2 CANCEL
3 UPDATE
4 CANCEL
5 SUBMIT
6 UPDATE
If I do:
select * from table
Can I order the results in the order I want using MySQL?
ASC would be CANCEL,SUBMIT,UPDATE and DESC the reverse. What if I want a different order like SUBMIT,CANCEL,UPDATE? Is it possible?
If I understood correctly, this is what you need:
You can change the order of colum values to correspond your demand.
Here’s the test:
http://sqlfiddle.com/#!2/d1885/3