Question 61 · 167 in bank
Select 2Which two statements are true about the ORDER BY clause? (Choose two.)
Show answer
Answer: DE
Explanation
A – false; following queries are executed correctly: SELECT * FROM employees ORDER BY 1; SELECT emp_name, dept_id FROM employees ORDER BY emp_id; B – false; no mention in Oracle documentation about numeric values order C – false; Quoting Oracle documentation - options NULLS FIRST | NULLS LAST Specify whether returned rows containing null values should appear first or last in the ordering sequence. NULLS LAST is the default for ascending order, and NULLS FIRST is the default for descending order. D – true; example: SELECT emp_name AS en, dept_id FROM employees ORDER BY en; E – true; example: SQL> SELECT emp_id,emp_name FROM employees WHERE UPPER(emp_name)='JONES' ORDER BY emp_name ASC; EMP_ID EMP_NAME ---------- ---------- 1 JONES 7 JONES 10 JOnes 9 Jones
Source: Adapted from community discussion — nautil2