ITPub博客

首页 > 数据库 > Oracle > SQL入门之11 DatabaseTransactions

SQL入门之11 DatabaseTransactions

原创 Oracle 作者:wmlm 时间:2007-04-06 12:18:14 0 删除 编辑

事务何时开始、何时结束?显式的事务控制? 隐式的事务发生

[@more@]

-- 事务何时开始、何时结束?
When Does a Transaction Start and End?
A transaction begins when the first DML statement is encountered and ends when one of the following occurs:
A COMMIT or ROLLBACK statement is issued
A DDL statement, such as CREATE, is issued
A DCL statement is issued,such as grant,is issued
The user exits iSQL*Plus
A machine fails or the system crashes

-- 显式的事务控制
Explicit Transaction Control Statements
COMMIT, SAVEPOINT, and ROLLBACK
SAVEPOINT SAVEPOINT_name
ROLLBACK TO SAVEPOINT_name

-- 隐式的事务发生
Implicit Transaction Processing
(Automatic commit): DDL statement or DCL statement is issued. iSQL*Plus exited normally, without explicitly issuing COMMIT or ROLLBACK commands.
(Automatic rollback): Abnormal termination of iSQL*Plus or system failure.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/271063/viewspace-908951/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: SQL入门之10 MERGE
请登录后发表评论 登录
全部评论

注册时间:2008-04-08

  • 博文量
    398
  • 访问量
    3716774