What will happen when we fire below query?

select employee_id,first_name,middle_name,dob from employee_master order by 2,2;

 Posted by vishalneeraj-24503 on 7/1/2014 | Category: Sql Server Interview questions | Views: 1136 | Points: 40

It will throw an error saying that
Msg 169, Level 15, State 1, Line 1
A column has been specified more than once in the order by list. Columns in the order by list must be unique. It means we have to pass different column_id in order by clause.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response