| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: MERGE as the imperative form of aggregation
Marshall wrote:
> ...
> So, what else has a transform that has a concept of
> identity and also specifies a key? An aggregate
> with GROUP BY.
>
> MERGE NewFooCount f' into FooCount f
> GROUP BY id
> SET f.count = sum(f.count, f'.count);
>
> It's less general, but syntactically and conceptually
> cleaner and simpler.
> ...
I'd say MERGE is still a bastard because it operates on tuples, not relations, ie., a tuple in one operand is not necessarily in the result, whereas UNION, say, isn't like that. It appears to be using a label to hide the real construction, eg., "UPDATE OR INSERT".
p Received on Sun Apr 08 2007 - 10:54:15 CDT
![]() |
![]() |