Subject | Not work when subquery uses "select first nn"? |
---|---|
Author | Sean |
Post date | 2006-09-19T18:57:22Z |
I just came across a query:
SELECT ID FROM table WHERE ID IN
(SELECT FIRST 2 ID FROM table)
(ID is primary key. The table has 10 records)
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?
SELECT ID FROM table WHERE ID IN
(SELECT FIRST 2 ID FROM table)
(ID is primary key. The table has 10 records)
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?