?
What is the significance of "ORDER BY emp_id DESC" in the following MySQL command?
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;
Answer & Solution
Correct Answer:
Option
A
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.
"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
Login to post a comment or share your explanation.
Login