ExamVeda
Login
Home
This question belongs to MySQL MySQL Miscellaneous
MySQL Miscellaneous
?

What is the significance of "ORDER BY" in the following MySQL statement?
SELECT emp_id, fname, lname
FROM person
ORDER BY emp_id;

Answer & Solution
Correct Answer: Option A
The "ORDER BY" clause in a MySQL statement is like telling the database to arrange the results in a specific order.
In this case, "ORDER BY emp_id" means the results will be sorted based on the values in the "emp_id" column.
By default, the sorting is done in ascending order, meaning the lowest values of "emp_id" will appear first.
So the answer is Option C: Data of emp_id will be sorted in ascending order.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.