Subject Re: [firebird-support] Re: Help with a DELETE command
Author Ann W. Harrison
At 05:36 PM 12/5/2004, Adam wrote:

>DELETE FROM Child c
>WHERE EXISTS(
> SELECT FIRST 1 1 FROM Parent p
> WHERE p.F_CHILD_ID = c.F_ID AND p.F_FOO = 1)
>
>I have added the 'first 1' directive to say only return the first
>record. It is logically equivalent but just might save firebird some work.

Exists is smart enough to stop when the condition is satisfied. You
don't need to tell it.

Regards,


Ann