Subject Re: [firebird-support] Does Firebird support deletes, updates with subquery?
Author Lester Caine
Carlo Bergamini wrote:

>>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
>>
> Hi Helen, have a good day.
> Sorry for the dumb question but...what 1 represents in the query??

'1'
It simply provides a return from the select if a record exists. EXISTS
does not need any field information, it has a yes/no for the record, so
'1' is just a dummy field.

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services