Subject Re: [firebird-support] Does Firebird support deletes, updates with subquery?
Author Helen Borrie
At 07:35 PM 18/02/2005 +0000, you wrote:

>Does Firebird support deletes and/or updates with subquery?.
>Something like this:
>
>DELETE FROM RECIPES
>WHERE R_ID = ( SELECT R_ID FROM INGREDIENTS
> WHERE NAME='RICE' )

DELETE FROM RECIPES R
WHERE EXISTS
(SELECT 1 FROM INGREDIENTS
WHERE I.R_ID = R.R_ID
AND I.NAME='RICE')

And, yes, you can use a subquery in either the SET value or the search
value of an update query. I can't offer a sensible example from your
current example, though. Give some detail about what you'd want to do in
such an update.

./heLen