5 pts.
 Order by clause in SQL Server subqueries
why the "order by" clause in sub queries must be associated with "top" clause in sql server..??

Software/Hardware used:
sql server 2008
ASKED: August 18, 2011  9:12 AM
UPDATED: April 11, 2012  1:51 PM

Answer Wiki:
top clause in sql which requires you have to sort the rows based rownum because this, you need to use "order by".
Last Wiki Answer Submitted:  August 26, 2011  12:39 pm  by  Komurepo   45 pts.
All Answer Wiki Contributors:  Komurepo   45 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Let’s change the question:

Why would you want to order a subquery if you are not going to use the top clause ?

 63,535 pts.

 

This is Standard’s requirement basing on the fact that table has no ordering in rows.

 1,610 pts.

 

hi Karthikharve,
because subquery want single value for only main query executed.

 65 pts.