SAVEPOINT 标记

Posted 妤轩

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SAVEPOINT 标记相关的知识,希望对你有一定的参考价值。

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 标记的主要内容,如果未能解决你的问题,请参考以下文章

FlinkFlink 1.13 版本 SavePoint 源码分析

MySQL的SQL语句 -事务性语句和锁定语句- SAVEPOINT

Flink SavePoint

mysql事务之savepoint

数据库savepoint

Flink Savepoint 工作机制