QuestionQ106

VerifiedRestricting and sorting data

Review this partial statement:

SELECT ename, sal, comm FROM emp  

Now review this output:

Question Image

Which ORDER BY clause produces the displayed output?

Explanation

Sorting comm in descending order places the commission values 1400, 500, 300, and 0 in that sequence. NULLS LAST places rows with no commission after those values, and the secondary ename sort orders those NULL-commission rows alphabetically.

Learn more

Community Discussion

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