How to limit number of rows
November 7, 2007Some useful information which was passed to me by a DBA on how to limit rows in oracle, MSSQL and My-SQL.
To limit rows in Oracle:
SELECT product, description, price
FROM Products
WHERE ROWNUM < 10
To limit rows in MSSQL:
SELECT TOP 10 product, description, price
FROM Products
To limit rows in My-SQL:
SELECT product, description, price
FROM Products
LIMIT 10
Hope that this information should is useful to others also.
Posted by Vishal Reddy