What is the significance of "ORDER BY emp_id ASC" in the following MySQL command?
SELECT emp_id, fname, lname
FROM person
ORDER BY emp_id ASC;
SELECT emp_id, fname, lname
FROM person
ORDER BY emp_id ASC;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 B
Solution (By Examveda Team)
This MySQL command selects the employee ID (emp_id), first name (fname), and last name (lname) from the table called person.The part "ORDER BY emp_id ASC" is crucial for how the data is organized.
Here's the breakdown:
* ORDER BY: This tells MySQL to sort the results of the query.
* emp_id: We are sorting the results based on the emp_id column.
* ASC: This means "ascending order", which means the data will be sorted from the lowest employee ID to the highest employee ID.
Therefore, the correct answer is Option B: Data of emp_id will be sorted in ascending order.

Join The Discussion