首页 > 其他 > 详细

SAVEPOINT 标记

时间:2017-07-19 21:11:24      阅读:213      评论:0      收藏:0      [点我收藏+]

create table duo(               --创建表格
                v_xuhao number(3),
                v_name varchar2(10),
                v_job varchar2(10),
                v_time date
);

insert into duo values (001,     --添加内容
                        ‘李颖‘,
                        ‘经理‘,
                        to_date(‘2011-05-20‘,‘YYYY-mm-dd‘)
);
SAVEPOINT A;                     --标记为A点
insert into duo values (002,
                        ‘张强‘,
                        ‘店长‘,
                        to_date(‘2014-06-27‘,‘YYYY-mm-dd‘)
                     
);
insert into duo values (003,
                        ‘李明‘,
                        ‘店员‘,
                        to_date(‘2015-01-27‘,‘YYYY-mm-dd‘)
 );
 SAVEPOINT B;                       --标记为B
insert into duo values (004,
                        ‘照抄‘,
                        ‘店员‘,
                        to_date(‘2016-05-27‘,‘YYYY-mm-dd‘)
 );
commit;       --提交
 

delete from duo
where v_xuhao=2;

ROLLBACK
to SAVEPOINT B;


select * from duo

SAVEPOINT 标记

原文:http://www.cnblogs.com/hyx0920/p/7207563.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!