Limitar registro na query

Firebird

28/06/2004

pessoALL
Como faria uma query para me retornar apenas os 10 primeiros registros de uma tabela???


Fvilela

Fvilela

Curtidas 0

Respostas

Maicongabriel

Maicongabriel

28/06/2004

SELECT FIRST 10 campo FROM tabela
:wink:


GOSTEI 0
Afarias

Afarias

28/06/2004

FIRST apenas no Firebird

no Interbase (6.5 em diante) vc tem q usar ROWS

select * from tabela
order by campo_tal rows 10;


e no Interbase 6.0 ou inferior, apenas com stored procedures.


T+


GOSTEI 0
Fvilela

Fvilela

28/06/2004

Obrigado amigos.
Agora, vcs saberiam dizer qual é a sintaxe para o Oracle?


GOSTEI 0
Maicongabriel

Maicongabriel

28/06/2004

[b:0f38ab2c7e]::[/b:0f38ab2c7e] [url]http://www.experts-exchange.com/Databases/Oracle/Q_20978678.html[/url]


GOSTEI 0
POSTAR