Home / CSE MCQs / MySQL Database MCQs :: Discussion

Discussion :: MySQL Database MCQs

  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 emp_id
    FROM person
    ORDER BY emp_id;
  2. A.
    {-3, -2, -1, 1, 2, 3}
    B.
    {-1, 1, -2, 2, -3, 3}
    C.
    {1, 2, 3, -1, -2, -3}
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    "ORDER BY clause sort the emp_id in the result set.


Be The First To Comment