Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between "commit" and "commit work"?

Tags:

oracle

sqlplus

I was asking in terms of the Oracle SQL*PLUS ...

like image 689
Prashanth Reddy Avatar asked Nov 04 '10 16:11

Prashanth Reddy


People also ask

What is the work of COMMIT?

Use COMMIT WORK only at the end of a multistatement operation in a database with transaction logging, when you are sure that you want to keep all changes made to the database from the beginning of a transaction. The COMMIT WORK statement releases all row and table locks.

Why we use COMMIT work in SAP?

The statement COMMIT WORK closes the current SAP LUW and opens a new one. All change requests from the current SAP LUW are then committed. In this case, COMMIT WORK performs the following actions: It executes all subroutines registered using PERFORM ON COMMIT.

What is COMMIT work in Oracle?

Purpose. Use the COMMIT statement to end your current transaction and make permanent all changes performed in the transaction. A transaction is a sequence of SQL statements that Oracle Database treats as a single unit. This statement also erases all savepoints in the transaction and releases transaction locks.

Can we use COMMIT work in BAdI?

You must not commit in a BAdI.


2 Answers

Nothing :-)

Oracle says

The WORK keyword is supported for compliance with standard SQL. The statements COMMIT and COMMIT WORK are equivalent.

like image 89
David Gelhar Avatar answered Oct 13 '22 22:10

David Gelhar


Nothing - it's an optional statement

See here for more details

Quoting from this article:

To make the changes done in a transaction permanent issue the COMMIT statement.

The syntax of COMMIT Statement is

COMMIT [WORK] [COMMENT ‘your comment’];

WORK is optional.

COMMENT is also optional, specify this if you want to identify this transaction in data dictionary DBA_2PC_PENDING.

like image 42
Gary Rowe Avatar answered Oct 13 '22 22:10

Gary Rowe