Subject | Re: Not work when subquery uses "select first nn"? |
---|---|
Author | Sean |
Post date | 2006-09-19T20:42:18Z |
--- In firebird-support@yahoogroups.com, "Leyne, Sean" <Sean@...> wrote:
>Nope, the "first 2" was still not picked up.
> Sean,
>
> > How many records does it return, 2 or 10? I got 10, which is the same
> as
> >
> > SELECT ID FROM table WHERE ID IN
> > (SELECT ID FROM table)
> >
> > Does "first 2" work in subquery?
>
> Try this SQL:
>
> SELECT T1.ID FROM table T1 WHERE T1.ID IN (SELECT first 2 T2.ID FROM
> table T2)
>
>
> Sean
>