From the course: Oracle Database 19c: Advanced SQL

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

USING clause

USING clause - Oracle Database Tutorial

From the course: Oracle Database 19c: Advanced SQL

Start my 1-month free trial

USING clause

- [Narrator] The MERGE statement is complex, with many options. I'll show you the high-level syntax and more details of the using clause. Here's the general format of the MERGE statement. You specify the table you wish to update, insert into or delete from, within to. The source of the merge can be a sub query or just a plain table, for example, if you want to merge the contents of two tables into the destination table. I'll focus on the using clause in the following slides. Here's the employee updates table which contains inserts, updates, and deletes. I'll decide what to do with the corresponding row and employees based on the employee ID and employee updates. The next three columns provide an update to the first name, last name, or commission percent columns, if the column isn't null. The last column, 'EMP_DELETE', will delete the row in the target table if it's value is 'Y'. The employee's table has 107 rows and here are a few rows with the employee ID, first name, last name and…

Contents