This seems to be SQL developer problem
Arunkumar, January 31, 2018 - 6:44 pm UTC
This is not working in SQL Developer version 2.1.1.64
(O/P:(rollbacks everything)
1 rows inserted
savepoint a succeeded.
1 rows inserted
savepoint b succeeded.
1 rows inserted
Rolledback
)
This is working in SQL Developer version 4.0.1.14
(O/P:(rollbacks only upto savepoint b)
1 rows inserted.
savepoint a
1 rows inserted.
savepoint b
1 rows inserted.
rollback complete.)
The only difference I see it the last statement in the o/p screen "Rolledback" from old SQL developer and "rollback complete." from new SQL developer.
Weird.....
February 01, 2018 - 10:38 am UTC
If that's the case, there's an easy fix then ;)
Savepoint
A reader, March 11, 2018 - 4:44 am UTC
With regards to below queries in livesql.oracle.com,
why savepoint statement shows up "Invalid Statement" error?
create table emp1(empno number,ename char(4),sal number);
create table emp2(empno number,ename char(4),sal number);
create table emp3(empno number,ename char(4),sal number);
insert into emp1(empno,ename,sal) values (109,'Sami',3000);
savepoint a;
March 13, 2018 - 2:22 am UTC
Looks like an omission or bug. I'll log it with the LiveSQL team.