Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle sql limit results

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

sql oracle limit

SELECT * 
FROM   sometable
ORDER BY name
OFFSET 20 ROWS FETCH NEXT 10 ROWS ONLY;
Comment

PREVIOUS NEXT
Code Example
Sql :: how to get previous year from sysdate in oracle 
Sql :: how to create a table structure from another table in mysql 
Sql :: Upgrading postgresql data from 13 to 14 failed! 
Sql :: oracle dynamic select into 
Sql :: install mysql for fedora 34 
Sql :: sql ending with vowels 
Sql :: mongodb vs mysql 
Sql :: How to import CSV file into a MySQL table 
Sql :: MySQL import data from large CSV file 
Sql :: mysql query to find duplicate records 
Sql :: drop database using terminal postgres 
Sql :: functions with parameters SQL 
Sql :: select only the month-day from date in PL-SQL 
Sql :: how to get all dates in a month in oracle 
Sql :: oracle chain rules 
Sql :: soql user profile 
Sql :: how to casting data types in postgresql 
Sql :: postgresql could not start server mac 
Sql :: substring sql 
Sql :: sql compiler online 
Sql :: declare temp table in sql 
Sql :: install mysql in ubuntu 18.04 
Sql :: print boolean in plsql 
Sql :: mariadb case switch 
Sql :: mysql decimal remove trailing zeros 
Sql :: mysql search replace 
Sql :: docker hub mysql 
Sql :: min mysql 
Sql :: sql select on string 
Sql :: not operator in sql 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =