MERGE is ANSI SQL:2011-compliant.
Note that in the ANSI definition, this statement is named MERGE INTO, while in the Teradata definition, INTO is an optional keyword.
The privileges required to perform MERGE depend on the merge matching clause of the request you submit.
IF you specify this type of merge matching clause … |
THEN you must have this privilege … |
WHEN MATCHED |
UPDATE on every column of target_table that is specified in the UPDATE SET set clause list. DELETE on every column of target_table that is specified in the DELETE SET set clause list. |
WHEN NOT MATCHED |
INSERT on target_table. The INSERT privilege is also required on all of the columns specified in the INSERT column list. |
both |
Note: DELETE cannot be combined with INSERT or UPDATE in a MERGE statement. |
The privileges required for a MERGE … LOGGING ERRORS operation are the same as those for MERGE operations without a LOGGING ERRORS option with the exception that you must also have the INSERT privilege on the error table associated with the target data table for the MERGE operation.