Sybase
Return the first n lines.
select top n * from table order by column
This does not work because top is a keyword, not a function:
select top(n) * from table order by column
Apply a restriction to multiple queries with set rowcount
set rowcount n select * from table order by column ... set rowcount 0
MySQL
MySQL Docs
Return the first n lines, starting at line m.
select * from table limit m, n order by column
SQL Server
Return the first n rows
select top n from table order by column
Oracle
Return the first n rows
select * from table where rownum < 5 order by column
Sqlite
SQLite docs
Return the first n rows
select * from table order by column limit(n)
Return the first n lines starting at line m
select * from table order by column limit(m,n)
Return the first n rows
select * from table order by column limit(n) offset(m)
Postgres
Postgres Docs
Return the first n rows
select * from table order by column limit(n)
Return the first n lines starting at line m
select * from table order by column limit(n) offset(m)
If I missed any databases or row restriction methods, post a comment and I will add it. Thanks!