Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 28 Oct 2003 @ 11:00:35 GMT


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


Subj:   Re: Is there any system column like the Oracle RowNum in Teradata?
 
From:   Neeraj Sappal

I think the user has asked for RowNum pseudo column which is different from OLAP function Row_Number which exists both in Oracle and Teradata (V2R5).

If the user is keen to generate a sequence number prior to V2R5, then it can be implemented using CSUM, something like -

CSUM(1) OVER (ORDER BY tbl_x.col_y ROWS UNBOUNDED PRECEDING)

RowNum in Oracle is a system column or a pseudo column which returns a number indicating the order in which Oracle selects the row from a table or set of joined rows. This can also be used to limit the output rows -

SELECT * FROM employees WHERE ROWNUM < 10;

--- Neeraj



     
  <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