Discussion
The rows of the result relation produced by a SELECT statement can be sorted, but only by one column.
Answer: B
Correct answer: False
ORDER BY accepts a list of columns, each with its own direction: ORDER BY dept ASC, salary DESC sorts by department and then, within each department, by descending salary.
The later columns act as tie-breakers, which is what makes multi-column sorting useful rather than merely possible. Expressions and column positions are also permitted, so ORDER BY LENGTH(name) or ORDER BY 2 are valid, though the numeric form is fragile when the SELECT list changes.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development