Quick Search:
 
 The Oracle PL/SQL WORK Keyword      [Return To Index] Jump to:  

Term: WORK

Definition:
In Oracle PL/SQL, the WORK keyword appears in the COMMIT statement. It was introduced in Oracle for compatibility with standard ANSI SQL. In terms of effect and purpose, COMMIT WORK is equivalent to COMMIT.

Example Syntax:

COMMIT [WORK] [WRITE] [WAIT | NOWAIT] [IMMEDIATE | BATCH] [FORCE]


Note that all clauses are optional in COMMIT statement.

Example Usage:

The below example shows the usage of COMMIT WORK in a transaction.

SQL> CREATE TABLE TEST (A NUMBER,B NUMBER)
Table created.

SQL> INSERT INTO TEST VALUES (1,2)
1 row created.

SQL> INSERT INTO TEST VALUES (3,21)
1 row created.

SQL> INSERT INTO TEST VALUES (4,39)
1 row created.

SQL> INSERT INTO TEST VALUES (31,92)
1 row created.

SQL> COMMIT WORK;
Commit complete.


Related Links:
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org