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...

Is CURSOR_SHARING broken? and your other Database questions answered

First experience with APEXlang? Some quick tips

How do nested loop, hash, and merge joins work? Databases for Developers Performance #7

The how and why of deadlocks (ORA-00060)

Testing with utPLSQL

Explaining Explain Plans

Build Database APIs with PL/SQL in Oracle Database 23ai

SCD Type 1 and Type 2 using SQL | Implementation of Slowly Changing Dimensions

How to Use SQL Plan Baselines and SQL Profiles

Top PL/SQL Tips In Just One Hour

The five-step guide to SQL tuning | CloudWorld 2022

SQL Performance Tuning Case Study – Optimizing Dev Gym Leaderboards

Peaceful Focus Music to Reduce Distractions | Gamma Binaural Beats

Analysis of a Couple AWR Reports - OTW2018

Tuning cross-database SQL queries

Subquery in SQL | Correlated Subquery + Complete SQL Subqueries Tutorial

Materialized Views and More SQL Stuff

Harnessing the power of Oracle Database optimizer hints | CloudWorld 2022

Optimizing SQL Performance

