提问:关于mysql中是否rollback的条件判断问题
SET AUTOCOMMIT=0;START TRANSACTIONINSERT INTO Customers(cust_id)VALUES (11111);SAVEPOINT StartOrder;INSERT INTO Order(order_num)VALUES (20100);IF ROLLBACK SAVEPOINT StartOrder;COMMIT TRANSACTION这里想在IF里添加判断条件如果上一步的操作报错,则rollback,否则就commit transac
原创
2020-08-31 20:13:19 ·
399 阅读 ·
1 评论