add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE t1 (x int NOT NULL);
CREATE TABLE t2 (y int NOT NULL);
CREATE TABLE t3 (z int NOT NULL);

INSERT INTO t1 (x) VALUES (1);
INSERT INTO t2 (y) VALUES (2);
INSERT INTO t3 (z) VALUES (3);
CREATE PROCEDURE proc1()
BEGIN
UPDATE t1 SET x = x + 1;
END
CREATE PROCEDURE proc2()
BEGIN
UPDATE t2 SET y = y - 1;
END
CREATE PROCEDURE proc3()
BEGIN
UPDATE t3 SET z = z / 0;
END
SET autocommit = 0;
START TRANSACTION;
CALL proc1();
CALL proc2();
CALL proc3();
ROLLBACK
Division by 0
SELECT *
FROM t1;

SELECT *
FROM t2;

SELECT *
FROM t3;
x
2
y
1
z
3