db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danesh <danes...@gmail.com>
Subject Re: select: limit # of rows returned
Date Thu, 11 Aug 2005 03:37:30 GMT
This is DB2 syntax but it might work with Derby.. try

select * from thetable fetch first 5 rows only

Regards,
~danesh

On 8/10/05, Daniel Tripp <dtripp@activecore.com> wrote:
>  
> Hello.  I'm trying to limit the number of rows returned by a select
> statement.  I know that other databases have way to do this, such as: 
>   
> select * top 10 from thetable 
>   
> set rowcount 5 
> select * from thetable 
>   
> select * from thetable limit 10 
>   
> But I gather that these are particular to MySQL / MS SQL / whatever.  Done
> anyone know of a way that this can be done with Derby? 
>   
>

Mime
View raw message