Subject | Re: [firebird-support] Does Firebird support deletes, updates with subquery? |
---|---|
Author | Lester Caine |
Post date | 2005-02-20T09:33:34Z |
Carlo Bergamini wrote:
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
>>DELETE FROM RECIPES R'1'
>>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??
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