oracle - what statements need to be committed?

toop picture toop · Mar 2, 2012 · Viewed 147.5k times · Source

What are the list of statements that need to be committed before further action on the table in order to avoid a lock? I am not talking about full transactions with multiple statements and transaction integrity; instead I am referring to single statements.

I know insert should be committed but truncate has an autocommit. What is the full list of statements that need to be committed?

Need to be committed (starter list):

UPDATE
INSERT
DELETE

Answer

rics picture rics · Mar 2, 2012

DML (Data Manipulation Language) commands need to be commited/rolled back. Here is a list of those commands.

Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples:

INSERT - insert data into a table
UPDATE - updates existing data within a table
DELETE - deletes records from a table, the space for the records remain
MERGE - UPSERT operation (insert or update)
CALL - call a PL/SQL or Java subprogram
EXPLAIN PLAN - explain access path to data
LOCK TABLE - control concurrency