Subject | Re: Replace the statement REPLACE |
---|---|
Author | lacakus |
Post date | 2006-11-21T08:53Z |
>and
> My initial suggestion was to use a shortcut syntax using the standard
> MERGE keyword, so we would have two MERGEs - with a standard syntax
> with a shortcut one. I don't see what problems it would provide uswith,
> but AFAIS many of you don't like this option.Why ? It is good idea.
>
First MERGE statement can be as SQL2003 says :
MERGE INTO <target table>
USING <table reference>
ON <search condition>
WHEN MATCHED THEN UPDATE SET <set clause list>
WHEN NOT MATCHED THEN INSERT [ <left paren> <insert column list>
<right paren> ]
[ <override clause> ]
VALUES <merge insert value list>
And the second shortcut can be something like :
MERGE INTO <target table> [(<field_list>)] VALUES (<value_list>) ...
-Laco.