Home » MYSQL » Sorting Results » Question
  1. If attribute “fruit” stores data as “apple, mango, banana” in table person then what will be the output of the following query?
    SELECT fruit FROM Employee
    WHERE Emp_id=1
    ORDER BY fruit;
    1. apple, banana, mango
    2. mango, apple, banana
    3. apple, mango, banana
    4. All of above
    5. None of these
Correct Option: A

ORDER BY Clause always sort in alphabetical order which also known as lexicographical order.



Your comments will be displayed only after manual approval.