sqlselectsql-order-by

How to order by column A and then by column B?


How to write SQL so that the result can be ordered first by column A then by column B. Something like below:

SELECT * FROM tbl WHERE predictor ORDER by col_A and ORDER by col_B

Solution

  • ORDER BY col_A, col_B
    

    The SQLite website has syntax diagrams explaining the SQL grammar supported by SQLite.