Computer Science
Consider the following query
SELECT * FROM employee ORDER BY salary ..............., name ...............;
To display the salary from greater to smaller and name in alphabetical order which of the following options should be used ?
- Ascending, Descending
- Asc, Desc
- Desc, Asc
- Descending, Ascending
SQL Queries
1 Like
Answer
Desc, Asc
Descending, Ascending
Reason — To display the salary from greater to smaller i.e., in descending order we use DESC or descending
keyword and to sort name in alphabetical order i.e., in ascending order we use ASC or ascending
keyword.
Answered By
1 Like
Related Questions
The pattern '_ _ _' matches any string of …………… three characters. '_ _ _%' matches any string of …………… three characters.
- Atleast, Exactly
- Exactly, Atleast
- Atleast, All
- All, Exactly
By default, ORDER BY clause lists the results in …………… order.
- Descending
- Any
- Same
- Ascending
Fill in the blanks:
SQL stands for _________ Query Language.
Fill in the blanks:
The SQL keyword _________ is used to specify the table(s) that contains the data to be retrieved.