Order By Clause

  • I agree.. Never would have put the Order by in the sub because I don't see the reason too. So I would have never learn it would fail until now

  • Really had to think through this one. Thanks for a tough question of the day.

    http://brittcluff.blogspot.com/

  • 3rd will also fail since ambiguous column with order by.

  • Query 3 would fail because both tables contain employee id column but, alias name of employee id have not been used in order by clause. Please check for the Query 3 and revert back.

  • Nandhini Ramanujam (5/31/2012)


    Query 3 would fail because both tables contain employee id column but, alias name of employee id have not been used in order by clause. Please check for the Query 3 and revert back.

    Query 3 does not fail. if there is more than one EmployeeID column, the ORDER BY clause uses the one that is in the select statement. There is only one in the select statement so the query executes just fine.

  • very nicw question..i got it wrong though:-D

Viewing 6 posts - 46 through 50 (of 50 total)

You must be logged in to reply to this topic. Login to reply