Wednesday, May 31, 2006

Teradata Query to display nth Record

To select nth row from Teradata database table,u can use the below specified query

SEL * FROM (
SELECT sum(1) over (rows unbounded preceding) As ROW_ID
,columns FROM databasename.tablename
) a WHERE ROW_ID = n ;


Note:
update the above query(marked as red) with ur database related info.

Thanks

No comments: