冷静、沉淀

一个忽略了的事务问题

上一篇 / 下一篇  2006-09-21 00:00:00 / 个人分类:Oracle

DDL会提交事务,但,失败的DDL是否也会提交事务呢?


Session 1:

-- 建表

create table whuser.test1(c1 number);
create table whuser.test2(c1 number);

-- 在第一张表插入数据
insert into whuser.test1 values(1);

-- 执行DDL语句(该语句执行会失败)
alter table whuser.test2 add c1 number;

Session 2:

select * from whuser.test1;

-- DDL语句执行失败后,仍然提交了事务,得到的结果是1.


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-10-13  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 13673
  • 日志数: 838
  • 建立时间: 2007-12-28
  • 更新时间: 2008-10-02

RSS订阅

Open Toolbar