sexta-feira, 15 de março de 2013

limitar o número de registros retornados em uma consulta SQL


DB2 -- select * from table fetch first 10 rows only 
Informix, InterBase/Firebird, SKIP  -- select first 10 * from table 
Microsoft SQL Server and Access -- select top 10 * from table 
MySQL, PostgreSQL, SQLite, HSQL/H2 -- select * from table limit 10 
Oracle -- select * from table where rownum <= 10
Fonte: http://pontodebug.blogspot.com.br/2011/01/como-limitar-o-numero-de-registros.html