MySQL ORDER BY


  1. If emp_id contain the following set {9, 7, 6, 4, 3, 1, 2}, what will be the output on execution of the given query?
    SELECT emp_id
    FROM Employee
    ORDER BY emp_id;











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    “ORDER BY” clause sort the emp_id in the result set.


  1. If emp_id contain the following set {1, 2, 3, 4, 1, 1}, what will be the output on execution of the given query?
    SELECT id
    FROM Student
    ORDER BY id;











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    “ORDER BY” clause sort the emp_id in the result set.



  1. If emp_id contain the following set {1, 2, 2, 3, 3, 1}, what will be the output on execution of the given query?
    SELECT id
    FROM Student
    ORDER BY id;











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    “ORDER BY” clause sort the id in the result set.


  1. If emp_id contain the following set {-1, -2, 2, 3, -3, 1}, what will be the output on execution of the given query?
    SELECT id
    FROM Student
    ORDER BY id;











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    “ORDER BY” clause sort the id in the result set.



  1. Which keyword is used for sorting the data in descending order in Mysql?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    DESC