Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle PL/SQL WORK Keyword      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

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      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 240 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?