Check out example codes for "do we need to specify commit to save changes in mysql". It will help you in understanding the concepts better.

Code Example 1

BEGIN;
SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
UPDATE table2 SET [email protected] WHERE type=1;
COMMIT;

Code Example 2

SET AUTOCOMMIT=0

Learn ReactJs, React Native from akashmittal.com