SQL - TOP, LIMIT or ROWNUM Clause

Опубликовано: 17 Июнь 2026
на канале: BANSODE TECH SOLUTION
35
0

SQL - TOP, LIMIT or ROWNUM Clause
   • SQL - TOP, LIMIT or ROWNUM Clause  

TOP, LIMIT or ROWNUM Clause
The SQL TOP clause is used to fetch a TOP N number or X percent records from a table.
#Syntax
The basic syntax of the TOP clause with a SELECT statement would be as follows.
SELECT TOP number|percent column_name(s) FROM table_name WHERE [condition];

The following query is an example on the #SQLserver, which would fetch the #top 3 records from the CUSTOMERS table.
SELECT TOP 3 * FROM CUSTOMERS;

If you are using #MySQL server , then here is an equivalent example −
SELECT * FROM CUSTOMERS #LIMIT 3;

If you are using an #Oracle server, then the following code block has an equivalent example.
SELECT * FROM CUSTOMERS WHERE ROWNUM = 3;

SQL(Structured Query Language) Playlist
   • SQL Theory Tutorial(STRUCTURE QUERY LANGUAGE)  

#Subscribe the #Channel #Link :- #bansodetechsoluiotn #ajupgrading https://www.youtube.com/c/AjUpgrading...

IF any #Query or #Doubt #DM on #Instagram :- #bansode_ajay_2102
https://www.instagram.com/bansode_aja...

LinkedIn Profile
  / aj-upgrading-bansode-tech-solution-0a99657a  

Link for slides, code samples, and text version of the video #blogger
https://bansodetechsolution.blogspot.com