Prashanth Reddy
Prashanth Reddy

Reputation: 51

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

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

Upvotes: 5

Views: 19360

Answers (3)

Gary
Gary

Reputation: 7257

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.

Upvotes: 9

Five characters - ' WORK'.

:-)

However, the effect of both commands is identical.

Share and enjoy.

Upvotes: 2

David Gelhar
David Gelhar

Reputation: 27900

Nothing :-)

Oracle says

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

Upvotes: 17

Related Questions