Search
 
SCRIPT & CODE EXAMPLE
 

SQL

fetch first 5 rows in oracle sql developer

-- Oracle <= 11g 
SELECT * FROM ( SELECT * FROM emp ORDER BY sal DESC ) WHERE ROWNUM <= 5;
	
-- Oracle 12c +
SELECT * FROM emp ORDER BY sal DESC FETCH FIRST 5 ROWS ONLY;	
Comment

fetch first 10 rows in oracle sql developer

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;
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle finding duplicate records 
Sql :: wordpress database add admin 
Sql :: print in pl sql 
Sql :: oracle table privileges 
Sql :: sql list all procedures 
Sql :: mysql stop password policy 
Sql :: see all databases mysql 
Sql :: sql get missing id 
Sql :: get all tables postgres 
Sql :: sql server read uncommitted 
Sql :: mysql grant all privileges to user from any host 
Sql :: remove space in mysql 
Sql :: import sql file from laravel 
Sql :: STRING_AGG order by 
Sql :: ubuntu stop mysql 
Sql :: mysql server does not start mac 
Sql :: ms sql rename database 
Sql :: mysql add days to date 
Sql :: if date is today mysql 
Sql :: mysql import ignore errors 
Sql :: top 10 rows in mysql 
Sql :: sql server alter column 
Sql :: mysql 8 error on identified by 
Sql :: get columns number sql 
Sql :: install mysql powershell 
Sql :: sql find missing values between two tables 
Sql :: check database size sql 
Sql :: get the rows from two tables whose relation is in 3rd table 
Sql :: postgresql define pk sequence next number 
Sql :: pentaho + pasar de excel a sql 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =