Quiz: Sorting Rows

1. What columns can be added to the following SELECT statement in its ORDER BY clause? (Choose Three)
SELECT first_name, last_name, salary, hire_date
FROM employees
WHERE department_id = 50
ORDER BY ?????;

last_name, first_name. (*)
All columns in the EMPLOYEES table. (*)

The table name, EMPLOYEES, which would then automatically sort by all columns in the table.
Any column in the EMPLOYEES table, any expression in the SELECT list or any ALIAS in the SELECT list. (*)
All the columns in the database.

 

2. Which of the following is true of the ORDER BY clause: (Choose Two)
Must be the last clause of the SQL statement (*)
Displays the fetched rows in no particular order
Defaults to a descending order (DESC)
Defaults to an ascending order (ASC) (*)

 

3. What clause must you place in a SQL statement to have your results sorted from highest to lowest salary?
ORDER BY salary ASC
ORDER BY salary DESC (*)
ORDER salary BY DESC
None, the database always sorts from highest to lowest on the salary column.

 

4. A column alias can be specified in an ORDER BY Clause. True or False?
True (*)
False

Solution for Test: Quiz: Introduction to The Oracle Academy
Solution for Test: Quiz: Data vs Information
Top