MySQL Difference between BEGIN and START TRANSACTION
1
vote
1
answer
6056
views
I'm using RDS Aurora (MySQL 5.6)
By default Auto Commit flag is enabled.
I have a transaction as follows
BEGIN;
INSERT INTO .....;// STATEMENT 1
INSERT INTO ......;//STATEMENT 2
COMMIT;
I'm expecting both the Inserts to be commited only when COMMIT is executed.
But Statement 1 is Commiting as soon as it got executed.
So I wanted to know What does BEGIN do here ??
I was assuming that BEGIN does the task of disabling Auto Commit , Can someone also explain the difference between BEGIN and START TRANSACTION as well.
Asked by user3865748
(21 rep)
Mar 4, 2020, 12:47 PM
Last activity: Mar 4, 2020, 03:55 PM
Last activity: Mar 4, 2020, 03:55 PM