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 - Oracle Database Tutorial
From the course: Oracle Database 12c: Basic SQL
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
Introduction to DML and DDL commands2m 7s
-
(Locked)
Creating a simple table2m 1s
-
(Locked)
Inserting a new row to a table3m 15s
-
(Locked)
COMMIT and ROLLBACK2m 23s
-
(Locked)
Introduction to transactions3m 43s
-
(Locked)
Deleting rows for a table3m 23s
-
(Locked)
Updating values2m 40s
-
(Locked)
Multiple-statement transactions2m 41s
-
(Locked)
Truncating all data from a table2m 29s
-
(Locked)
Adding and dropping columns from a table3m 4s
-
-
-
-