Subject | Re: [firebird-support] Firebird and LIMIT |
---|---|
Author | Alan.Davies@aldis-systems.co.uk |
Post date | 2008-09-08T12:12:31Z |
select first 20 <your_column_name> from <your_table_name>
where <your_column_name>=<your_condition>
order by your_column_name
returns the first 20 rows.
e.g.
select first 20 account_name from supplier
where account_name between 'A' and 'B'
order by account_name
Most of your answers to this sort of question are in the Firebird
Release notes - freely downloadable.
HTH
--
Alan J Davies
Aldis
Quoting Norman McFarlane <norman@...>:
where <your_column_name>=<your_condition>
order by your_column_name
returns the first 20 rows.
e.g.
select first 20 account_name from supplier
where account_name between 'A' and 'B'
order by account_name
Most of your answers to this sort of question are in the Firebird
Release notes - freely downloadable.
HTH
--
Alan J Davies
Aldis
Quoting Norman McFarlane <norman@...>:
> Hi group,
> I'm converting an app from MySQL to FB. One of the bothersome issues
> is syntax.
> MySQL has the LIMIT modifier which takes a numeric argument,
> limiting the number of rows retuend by a query.
> MSSQL has an equivalent in TOP. does Firebird have anything like this?
> Obviously, one is inclined to think of the WHERE clause, but since
> you are not certain of what you're going to get back, until you've
> gotten it, it is not always possible to limit on the basis of the
> WHERE clause.
> Any suggestions as to how to overcome this problem?
> Regards,
> Norman
>
> [Non-text portions of this message have been removed]
>
>