1SELECT * FROM (SELECT [COLUMNS] FROM [TABLE] ORDER BY [DATE] DESC)
2 WHERE ROWNUM = 1;
3-- Oracle 12c:
4SELECT * FROM (SELECT [COLUMNS] FROM [TABLE] ORDER BY [DATE] DESC)
5 FETCH FIRST 1 ROW ONLY;
6SELECT * FROM (SELECT [COLUMNS] FROM [TABLE] ORDER BY [DATE] DESC)
7 FETCH FIRST 10 ROW ONLY;
8SELECT * FROM (SELECT [COLUMNS] FROM [TABLE] ORDER BY [DATE] DESC)
9 FETCH FIRST 10 ROWS ONLY;
1-- NOTE: This is for Oracle/PLSQL only
2
3-- > EXAMPLE
4select *
5from CONSUMERS
6where ROWNUM <= 1
7
8/*
9-- > SYNTAX
10select *
11from {yourTable}
12where ROWNUM <= {number-of-rows}
13
14*/