Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql limit results

-- MySql
SELECT * FROM emp ORDER BY sal DESC LIMIT 5;	
-- SQL Server 
SELECT TOP 5 * FROM emp ORDER BY sal DESC;	
-- 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 LIMIT Clause

SELECT first_name, age
FROM Customers
LIMIT 2;
Comment

sql limit

SELECT * FROM customer
LIMIT 10;
Comment

sql limit results

LIMIT 5
Comment

PREVIOUS NEXT
Code Example
Sql :: postgresql alter column data type from integer to integer array 
Sql :: how to assign custom id in mysql 
Sql :: import sql file to mysql db using shell commands 
Sql :: drop tables from local database postgres pgadmin 
Sql :: how to get last element sql 
Sql :: window function sql 
Sql :: find current server name for SSMS 
Sql :: what is between keyword used for 
Sql :: oracle job schedules 
Sql :: sql searching via key word 
Sql :: WHERE value IS sql 
Sql :: creating a database sql 
Sql :: drop unique 
Sql :: ms sql check if column is nullable 
Sql :: alter table add multiple columns mysql 
Sql :: oracle tablespace autoextend 
Sql :: mysql privileges 
Sql :: how to print some string in mysql 
Sql :: fatal error uncaught mysqli_sql_exception 
Sql :: Deleting data from tables 
Sql :: sql constraints 
Sql :: import database from sql file 
Sql :: update or insert sql 
Sql :: between operator 
Sql :: mysql update one table from another table multiple columns 
Sql :: mysql drop tables 
Sql :: postgresql replace html tags from string 
Sql :: tipos da linguagem SQL 
Sql :: edad en oracle 
Sql :: deduplicate delimited string bigquery 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =