Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 22 Mar 2006 @ 12:48:19 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Usage of TOP function
 
From:   Cappelli, Andrea

TOP function without an order by selects rows retrieve random rows. If you want the really top 50 rows you must use the order by clause..

for example:

     SELECT TOP 50 * FROM orders ORDER BY ship_date DESC;


     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023