Subject | Re: [ib-support] A Gotcha with SELECT FIRST |
---|---|
Author | Helen Borrie |
Post date | 2002-05-01T15:14:06Z |
At 05:03 PM 01-05-02 +0200, you wrote:
"delete from rosegarden where roses in (select first 10 roses from TAB1);"
would smell as sweet.
;-)
H.
All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________
>from Release Notes v.1.0.1:Just a column name.
>
>"
>A Gotcha with SELECT FIRST
>This
>
>delete from TAB1 where PK1 in (select first 10 PK1 from TAB1);
>
>will delete all of the rows in the table. Ouch! the sub-select is
>evaluating each 10 candidate rows for deletion, deleting them, slipping
>forward 10 more...ad infinitum, until there are no rows left. Beware!
>"
>
>Question: what is PK1 ?
"delete from rosegarden where roses in (select first 10 roses from TAB1);"
would smell as sweet.
;-)
H.
All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________