QuestionQ88

VerifiedRestricting and Sorting Data

For compound queries that use SET operators such as INTERSECT in a SQL statement, which column or columns are used by default to sort the output?

Explanation

For a set-operator compound query, the default sort key is the first column in the first SELECT list. To require a particular reliable presentation order, use a final ORDER BY, which applies to all rows returned by the compound query.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!