Search This Blog

2017/03/24

Get top 100 rows in Oracle/SQL Sever/MySQL

In Oracle:
SELECT * FROM (
    SELECT *
    FROM table
) WHERE ROWNUM < 101
In MySQL:
SELECT *
FROM
    table
LIMIT 100
In SQL Sever/ MS Access:
SELECT TOP 100
    *
FROM
    table

No comments :

Post a Comment