What is the significance of "ORDER BY emp_id DESC" in the following MySQL command?
SELECT emp_id, fname, lname
FROM person
ORDER BY emp_id DESC;
SELECT emp_id, fname, lname
FROM person
ORDER BY emp_id DESC;A. Data of emp_id will be sorted in descending order
B. Data of emp_id will be sorted in ascending order
C. Data of emp_id will be sorted in either ascending or descending order
D. All of the mentioned
Answer: Option A
Solution (By Examveda Team)
The code you see uses "ORDER BY emp_id DESC" to arrange the data. This part tells MySQL to sort the results of the query. Let's break down what it means:"ORDER BY" means that the results will be sorted.
"emp_id" means we're sorting by the column called "emp_id".
"DESC" means we are sorting in descending order.
So, the correct answer is Option A: Data of emp_id will be sorted in descending order.
In descending order, the largest values will appear first, and the smallest values will appear last.

Join The Discussion