Subject Re: [firebird-support] How do I read a specific range of records from a table in the database
Author Mark Rotteveel
On Mon, 21 Jan 2013 15:45:54 -0500, Ann Harrison <aharrison@...>
wrote:
> On Mon, Jan 21, 2013 at 2:59 PM, HotRodRudy <rpopeszku@...>
wrote:
>
>> Support,
>>
>> I am using Firebird server 2.5.2, Windows 7, and Visual Basic 2010.
>>
>> I would like to read a certain # of records from a table in the
database
>> using a start / stop record range. I am trying to re-write an
application
>> written by someone else which reads the entire database from beginning
to
>> end which takes a long time and I may only need the last 1000 records
of
>> a
>> database that can have over 100,000.
>
> You can using something like SELECT FIRST <n> <field list> FROM <source
> tables and conditions>

You can also use ROWS:
http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-select.html#langrefupd25-select-rows

Mark