1) COMMIT
Saves all pending changes permanent.
Example
COMMIT;
2) SAVEPOINT
It is a marker. It is used to identify a point to which you can roll back later. If two save point have same name then when you rollback will done until the last occurrence of the save point.
Example
SAVEPOINT A;
3) ROLLBACK
Discard all pending changes
Example
To discard all pending changes
ROLLBACK;
To discard to particular save point
ROLLBACK TO B;
4) SET TRANSACTION
It is used to set current transaction to read only and read write. This dosen’t affects other transaction by other users. To end this transaction use ‘COMMIT’ or ‘ROLLBACK’. Name is the transaction name given by user.
Example 1
SET TRANSACTION READ ONLY NAME 'TORENTO';
Example 2
SET TRANSACTION READ WRITE NAME 'TORENTO';
Saves all pending changes permanent.
Example
COMMIT;
2) SAVEPOINT
It is a marker. It is used to identify a point to which you can roll back later. If two save point have same name then when you rollback will done until the last occurrence of the save point.
Example
SAVEPOINT A;
3) ROLLBACK
Discard all pending changes
Example
To discard all pending changes
ROLLBACK;
To discard to particular save point
ROLLBACK TO B;
4) SET TRANSACTION
It is used to set current transaction to read only and read write. This dosen’t affects other transaction by other users. To end this transaction use ‘COMMIT’ or ‘ROLLBACK’. Name is the transaction name given by user.
Example 1
SET TRANSACTION READ ONLY NAME 'TORENTO';
Example 2
SET TRANSACTION READ WRITE NAME 'TORENTO';
No comments:
Post a Comment