Subject | RE: [firebird-support] Not work when subquery uses "select first nn"? |
---|---|
Author | Leyne, Sean |
Post date | 2006-09-19T19:15:57Z |
Sean,
SELECT T1.ID FROM table T1 WHERE T1.ID IN (SELECT first 2 T2.ID FROM
table T2)
Sean
> How many records does it return, 2 or 10? I got 10, which is the sameas
>Try this SQL:
> SELECT ID FROM table WHERE ID IN
> (SELECT ID FROM table)
>
> Does "first 2" work in subquery?
SELECT T1.ID FROM table T1 WHERE T1.ID IN (SELECT first 2 T2.ID FROM
table T2)
Sean