Subject Re: Does anybody know???
Author Adam
Hello Carlos

In Firebird 1.5 the syntax is

SELECT FIRST n SKIP m

Firebird 2 alpha release notes says that the rows syntax will be
introduced as well, but Firebird 2 is only in alpha 2.

So in your case,

Select First 10 *
from MyTable

In case you didn't know, you need to use an ORDER BY statement for
the thing to make any sense. The records will be read in the order
they are read (not necessarily in the order you expect).

So something like

select first 10 *
from MyTable
order by ID

etc may be what you are after.

Hope that helps.

Adam


--- In firebird-support@yahoogroups.com, Carlos Ortiz Quiros
<carlosaortiz@y...> wrote:
> Does anybody know how to convert the Microsoft SQL
> Server SELECT TOP 10 * FROM TableName to Firebird,
> that is, how can I write a query in Firebird SQL to
> retrieve the first 10 records out 1000 records from a
> result set.
>
> Thanks
>
> Carlos Adolfo Ortiz Q
> carlosaortiz@y...
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com