COMPUTER FUNDAMENTALS

COMPUTER APPLICATIONS

DATABASE MANAGEMENT SYSTEMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In the following Query, which of the following can be placed in the Query’s blank portion to display the salary from highest to lowest amount, and sorting the employs name alphabetically?SELECT * FROM instructor ORDER BY salary ____, name ____
A
Ascending, descending
B
Asc, Desc
C
Desc, Asc
D
All of the above
Explanation: 

Detailed explanation-1: -Expl:-To sort the salary from highest to lowest amount and display theemployee’s name alphabetically, one can use the “Desc and Asc” in the above-given Query.

Detailed explanation-2: -If you want to sort the data in descending order, you must explicitly specify it as shown below. ORDER BY name, salary DESC; The above query sorts only the column ‘salary’ in descending order and the column ‘name’ by ascending order.

Detailed explanation-3: -SELECT last name, job id, salary FROM employees WHERE job id IN (’IT PROG’, ‘SH CLERK’) AND salary NOT IN (4500, 10000, 15000);

Detailed explanation-4: -SELECT column-list|* FROM table-name ORDER BY ASC | DESC; SELECT * FROM Emp ORDER BY salary; SELECT * FROM Emp ORDER BY salary DESC;

There is 1 question to complete.