ORDER BY « Select Query « MySQL Tutorial






2.4.ORDER BY
2.4.1.ORDER BY controls the sequence of results
2.4.2.Sort the results in reverse by appending DESC to the condition
2.4.3.To sort in reverse (descending) order, add the DESC keyword to the name of the column
2.4.4.DESC keyword applies only to the column name immediately preceding it
2.4.5.We can use two or more ORDER BY conditions
2.4.6.Sort by date
2.4.7.Order by with 'limit' clause
2.4.8.Order first 4 rows
2.4.9.You can retrieve rows in random order








2.4.10.On character type columns, sorting is normally performed in a case-insensitive fashion
2.4.11.To use a case-sensitive sort for a column by using BINARY
2.4.12.Using both DESC and ASC in order clause