The PL/SQL code in order to return the second latest record ?
2 comments
Leave a comment
You must be logged in to post a comment.
Programming in PHP, C, C#, ASP.NET, Java, Objective-C, SQL also for MS SQL Server, Oracle & MySQL Development
The PL/SQL code in order to return the second latest record ?
You must be logged in to post a comment.
select whatEverfrom whereEver. . . order by yourDateField desc
select a. * from (select s. *,max(rn) over() maxr from (select TABLE. *,rownum rn from TAB1 order by rownum desc) s ) a where maxr-1=rn;Replace TABLE with the desired table name.