How to UPSERT (INSERT or UPDATE) rows with MERGE in Oracle Database

Описание к видео How to UPSERT (INSERT or UPDATE) rows with MERGE in Oracle Database

Often when loading data you want to add new rows and change the existing ones. So you need "update if exists, insert if not exists" logic, aka UPSERT. This can lead to complex statements and conditional logic.

The MERGE statement enables you to do both actions in one SQL statement.

This session covered the details of how this works. Highlights include:

05:15 - Overview of MERGE syntax
10:10 - Merging bind variable values
12:30 - Demo of MERGE
21:40 - Getting the INSERT vs UPDATE split for merged rows
22:30 - Using triggers to record INSERT vs UPDATE
25:00 - INSERT vs UPDATE count Flashback versions query
27:10 - INSERT vs UPDATE count with SQL Monitoring
33:35 - ORA-30926 unable to get a stable set of rows error
41:10 - Deleting rows in the target missing from the source
43:20 - Demo of insert vs update count, ORA-30926 error and deleting missing
52:30 - Performance of MERGE
57:50 - Demo of update only MERGE performance compared to UPDATEs
1:03:40 - Recap

Get the scripts for this session https://bit.ly/SQL-ATOH-MERGE
Improve Your SQL Skills with this FREE course https://devgym.oracle.com/pls/apex/dg...

Комментарии

Информация по комментариям в разработке