Home » MYSQL » MySQL ORDER BY » Question
  1. What will be the order of sorting in the given query?
    SELECT emp_id, emp_name
    FROM Employee
    ORDER BY emp_id, emp_name;
    1. Sorting {emp_name, emp_id}
    2. Sorting (emp_id} but not emp_name
    3. Sorting {emp_id, emp_name}
    4. All of above
    5. None of these
Correct Option: C

In the query, first “emp_id” will be sorted then emp_name with respect to emp_id.



Your comments will be displayed only after manual approval.