Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

oracle select first 10 rows

SELECT * FROM (SELECT [COLUMNS] FROM [TABLE] ORDER BY [DATE] DESC)
    WHERE ROWNUM >= 1 AND ROWNUM <=10;
-- Oracle 12c:
SELECT * FROM (SELECT [COLUMNS] FROM [TABLE] ORDER BY [DATE] DESC) 
    FETCH FIRST 10 ROWS ONLY;
 
PREVIOUS NEXT
Tagged: #oracle #select #rows
ADD COMMENT
Topic
Name
3+3 =