Subject | Re: top n of "select" ed result |
---|---|
Author | Peter |
Post date | 2004-11-02T03:30:06Z |
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:
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 somethinglike...
> >
> >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