Forums | Aggregator | Books | Industry News | Firefox Plugins | Social | Links

Comments

MERGE Statement Enhancements in Oracle Database 10g - Learn about the enhancements to the merge statement in Oracle Database 10g.



K P Ratnaker said...

This Merge SQL Statement is very userfull in ORACLE 10g

Muthu said...

explained very much clear. Useful too..

Wasif Hassan said...

Really an nice addition.....specially the 'DELETE WHERE'

Murali Namburi said...

Explained well. Merge statement in 10g reduces lot of coding effort.

Piyush Sachan said...

Merge is got way to convert dual functionallity (insert/Update) into one sql statement. Performance wise also this is exceptionally good.

Jordi Just said...

Sigo pensando que el perrino no funciona

martinka said...

i found in 10g documentation this sentence

Use the MERGE statement to select rows from one or more sources for update or insertion into one or more tables

I would like to user MERGE statement into two tables ( if matched update table1, if not matched insert into table2), however i'm desperate, since i could not find any example on it. As cited above documentation clearly says it is possible.

please have you, any suggestions how to perform such MERGE ?

grace said...

Very useful addition with DELETE WHERE Clause....
One guestion: delete can be on test1 a
table with WHERE Condition specified as stressed below? Is the following statement correct?
MERGE INTO test1 a
USING all_objects b
ON (a.object_id = b.object_id)
WHEN MATCHED THEN
UPDATE SET a.status = b.status
WHERE b.status != 'VALID'
DELETE WHERE (a.date = b.date)

BioBug said...

FYI, Merge Statements with bind variabled don't currently work when called over a database link.

martinka said...

to my previous comment: i found out , this is a bug in 10g documentation and is corrected in documentation for 11g. so unfortunatelly it is not possible to performe merge on two target tables.

Fernando said...

If you want to make an update to table_1 when matched and an update to table_2 when not matched I think you can use an IF sentence...
I'm gonna try it and let you know

DO NOT ask technical questions here! They will be deleted!

These comments should relate to the contents of a specific article. Constructive criticism is good. Advertising and offensive comments are bad and will be deleted!

Add your comments here.
Name
Comment
(max 400 chars - plain text)