All Forums Database
vpyoa 3 posts Joined 11/12
24 Jan 2013
TOP and Order by

Hi all
I'm new to teradata I want to confirm about the order priority of the execution of the query.
Sample query
 
Select top n x_column, y_column, z_column from table_abc order by x_column desc;
 
for the above mentioned query what is the order priority of the execution.
Whether the query fetch top n records at  first and then execute order by or else order by execut first and then if fetches top n records..
 
Thanks in advance..
 
 

Tags:
KS42982 137 posts Joined 12/12
24 Jan 2013

It would do the order by first and then fetch top n records.

You must sign in to leave a comment.