Discussion
To sort the results of a query use:
Answer: C
Correct answer: ORDER BY.
ORDER BY is the only clause that sorts a result. It comes last in the statement, after WHERE, GROUP BY and HAVING, because sorting is the final step applied to what those have produced.
This is worth stating plainly: a relation is a set, so without ORDER BY the rows come back in whatever order the engine finds convenient, and that order can change when data grows or an index is added. Code that depends on an unspecified order works until it does not.
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