Qual é a instrução nos bancos, para que o Select/Sql traga apenas o primeiro registro desejado?
Citação de Kindrazki em 11 de janeiro de 2013, 09:20Qual é a instrução nos bancos, para que o Select/Sql traga apenas o primeiro registro desejados?
Como Obter primeira linha Sql
[code]
SQLSERVER top 1
Select top 1 * from tabelaORACLE recnum = 1
Select * from tabela where rownum = 1DB2 fetch first 1 rows only
Select * from tabela where fetch first 5 rows onlyPOSTGRES LIMIT 1
Select * from tabela where limit 1MY SQL limit 1,1
Select * from tabela where limit 1,1ASA - ANYWHERE top 1
Select top 1 * from tabela
Qual é a instrução nos bancos, para que o Select/Sql traga apenas o primeiro registro desejados?
Como Obter primeira linha Sql
[code]
SQLSERVER top 1
Select top 1 * from tabela
ORACLE recnum = 1
Select * from tabela where rownum = 1
DB2 fetch first 1 rows only
Select * from tabela where fetch first 5 rows only
POSTGRES LIMIT 1
Select * from tabela where limit 1
MY SQL limit 1,1
Select * from tabela where limit 1,1
ASA - ANYWHERE top 1
Select top 1 * from tabela