What will happen when we fire below query?

Select ID,Name from Table_name order by 2;

 Posted by vishalneeraj-24503 on 7/2/2014 | Category: Sql Server Interview questions | Views: 547 | Points: 40
Answer:

It will successfully give result and will set order by with Name field as we have passed 2 in order by clause and as in the select list Id has 1st index position and Name has 2nd index position.That's why query will sort based on Name column.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response