From the course: Oracle Database 12c: Basic SQL

Unlock the full course today

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

Multiple-statement transactions

Multiple-statement transactions - Oracle Database Tutorial

From the course: Oracle Database 12c: Basic SQL

Start my 1-month free trial

Multiple-statement transactions

- [Instructor] So now that we are familiar with the concept of database transactions, and saw insert update and delete DLM commands and actions. Lets see what happens when we issue multiple different distinct DLM commands as part of a single database transaction. So we'll start by deleting all records from the test_table1 table. So I'll type delete from test_table1. Lets also insert a couple of new rows to the same table. So I'll type insert into test_table1 values('new row!',1) Lets also insert another record to our table. So we'll type the same command but specify another new row as the first value and two as the second value. Lets execute this command and verify that two rows have been inserted to the table. Lets also update some data in our table. So I'll type update test_table1 set col1=UPDATED! Where col2=2. Lets run this command and see that one row has been updated. So in one transaction I have essentially deleted two records, inserted two new records, and updated one of these…

Contents