Thursday, November 22, 2007

Limit in select query

SQL Server:
SELECT TOP 10 * FROM [TableName]

Oracle:
SELECT * FROM [TableName] WHERE RowNum <= 10 MySQL:
SELECT * FROM [TableName] LIMIT 0,10 (First 10 rows start from row 1)
SELECT * FROM [TableName] LITMIT 5, 10 (First 10 rows start from row 6)

No comments:

Post a Comment

Oracle Query