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 :: possgress drop if exists table 
Sql :: show indexes in mql 
Sql :: Mysql query add column with default string value 
Sql :: drop view in mysql 
Sql :: oracle search code in packages 
Sql :: wordpress sql find and replace 
Sql :: how remove column in mysql 
Sql :: convert varchar to int in sqlite 
Sql :: postgres get month name from date 
Sql :: mysql get time from datetime 
Sql :: mysql concatenate two columns into one 
Sql :: linux command line import mysql database 
Sql :: how to rename table in sql 
Sql :: top 10 rows in mysql 
Sql :: adding a default constraint to an existing column in sql 
Sql :: sql server select top 2 of each group 
Sql :: bulk kill mysql processlist 
Sql :: find column name in database 
Sql :: mysql date greater than 30 days 
Sql :: oracle next run dates 
Sql :: oracle sql query to make column data uppercase 
Sql :: how to see logical reads in sql server 
Sql :: create a table with an id in mysql 
Sql :: mysql show table column full description 
Sql :: setVal pgsql 
Sql :: grant all privileges mysql 8.0.21 
Sql :: sql for date greater than 
Sql :: rows to comma separated values in mssql 
Sql :: c# get sql min date 
Sql :: mysql smallint range 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =