MySQL order by

Order by one field:


select * from `table` order by `column` desc;

Order by two fields:


select * from `table` order by `column1`, `column2` desc;

Order by two fields with different order:


select * from `table` order by `column1` desc, `column2` asc;

Leave a Comment