Subject RE: [IBO] Limit Records
Author Helen Borrie (TeamIBO)
At 01:52 AM 07-08-02 -0400, you wrote:
>I know that the IBO query components allow you limit the number of
>records returned, but can I also achieve the same result within the SQL
>itself? I have done this with SQL Server, but not with IBO/InterBase.

With InterBase versions < 6.5, no.

With Firebird, yes.

select FIRST [m] SKIP [n] <rest of statement>
where m is the number of rows and n indicates how many rows to skip before
beginning the output set.

The IB 6.5 syntax is different - uses different keywords and semantics and
is a sub-clause of an ORDER BY clause, viz.
[ORDER BY clause]
[ROWS <lower_value> [TO <upper_value>] [BY <step_value>] [PERCENT] [WITH TIES]

For more info see the appropriate docs...

Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at