Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle limit rows

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

oracle limit rows

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

PREVIOUS NEXT
Code Example
Sql :: tsql random number 
Sql :: date in where on datetime column clause mysql 
Sql :: mysql user change password 
Sql :: mysql error incompatible with sql_mode=only_full_group_by 
Sql :: how to change mysql root password in windows 10 
Sql :: mysqli_connect using prepare statement 
Sql :: date_trunc postgres 
Sql :: wordpress print query sql 
Sql :: t-sql get duplicate rows 
Sql :: change old domain to new domain name wordpress 
Sql :: ORA-00903 
Sql :: Insert from table tsql 
Sql :: mysql update table from another table 
Sql :: datepart postgres 
Sql :: mysql concatenate select results 
Sql :: postgres group by 10 minute intervals 
Sql :: set nocount on sql 
Sql :: sql add column after another column 
Sql :: mysql show attributes of a table 
Sql :: temp table sql 
Sql :: postgresql to_char time 
Sql :: mysql trim 
Sql :: regex mongoose 
Sql :: create user sql server 
Sql :: date_part mysql 
Sql :: sql drop default 
Sql :: how to use rank function in sql 
Sql :: How to drop a foreign key constraint in mysql ? 
Sql :: update query in sql server 
Sql :: not exists mysql 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =