Home » MYSQL » MySQL ORDER BY » Question
  1. Is there any error in the following query?
    SELECT emp_id, title, start_date, First_name, fed_id
    FROM Employee
    ORDER BY RIGHT (fed_id, 3);
    1. No error
    2. Depends
    3. Yes
    4. All of above
    5. None of these
Correct Option: A

“ORDER BY” clause can be used with expression such as fed_id, which is a social security no like 111, 111, 111 therefore we sort it taking only three digits from right.



Your comments will be displayed only after manual approval.