Transaction Rollback and commit : Transaction Rollback Commit « Table « Oracle PL / SQL






Transaction Rollback and commit

  


SQL>
SQL> -- rollback and commit
SQL>
SQL> create table t ( x number(1) );

Table created.

SQL>
SQL>
SQL> insert into t values ( 1 );

1 row created.

SQL> insert into t values ( 2 );

1 row created.

SQL>
SQL> rollback;

Rollback complete.

SQL> select * from t;

no rows selected

SQL> insert into t values ( 1 );

1 row created.

SQL> insert into t values ( 2 );

1 row created.

SQL> commit;

Commit complete.

SQL> select * from t;

         X
----------
         1
         2

SQL>
SQL> drop table t;

Table dropped.

SQL>
SQL>
SQL>
           
         
    
  








Related examples in the same category

1.atomicity: roll back and commit
2.Rollback a delete
3.TRANSACTION CONTROL
4.set transaction use rollback segment SEGMENT_NAME
5.show autocommit
6.Transactions and Error Handling
7.Transactions and Savepoints
8.SET TRANSACTION READ WRITE
9.Rollback to savepoint in exception handler
10.alter rollback segment SEGMENT_NAME online