Most recent in Oracle DB

List the most recently added rows based on a date column.

CodeFunctionName
What is this?

Public

Tested

Original Work
To list the most recently 100 modified rows:
Use:
SELECT * from Tab1 ORDER BY moddate desc OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY;

Or:
Select * From (Select * From Tab1 ORder by ModDate desc) Where RowNum <101;

Do Not use:
Select * From Tab1 Where Rownum <101;

Since the last one does not guarantee listing rows by most added

Views 1,091

Downloads 386

CodeID
DB ID