Multiple choice technology databases

You can sort query results by more than one column. The sort limit is the number of columns in the given table.

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

SQL allows sorting by multiple columns using comma-separated column names in the ORDER BY clause: 'ORDER BY col1, col2, col3'. The practical limit is indeed the number of columns in the table or result set, though very large numbers of sort columns are rare in practice. Multi-column sorting creates a hierarchical sort where results are ordered by the first column, then ties within that column are ordered by the second column, and so on.

AI explanation

Most query tools let you specify a multi-column sort order (e.g., ORDER BY col1, col2, col3), and because you can list every column of a table in the sort clause, the practical ceiling on how many columns you can sort by is the total number of columns the table has.