Subject Re: top n of "select" ed result
Author Peter
Hi

Wow, too easy when you know how :D - obviously I'm still learning :D

Regards

Peter

--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:

> >Perhaps that should be re-phrased as how do I have FB do something
like...
> >
> >select TOP(10) salesman, sales_qty from employee?
>
> SELECT FIRST 10
> SALESMAN, SALES_QTY
> FROM EMPLOYEE
> ORDER BY 2 DESC
>
> It doesn't make sense to do a top/first query without an order by -
> otherwise the question is "first of what?"
>
> To skip the first 10 and get the next 10:
>
> SELECT FIRST 10 SKIP 10
> SALESMAN, SALES_QTY
> FROM EMPLOYEE
> ORDER BY 2 DESC