mysql begin commit rollback example
Example 1: do we need to specify commit to save changes in mysql
BEGIN;
SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
UPDATE table2 SET summmary=@A WHERE type=1;
COMMIT;
Example 2: do we need to specify commit to save changes in mysql
SET AUTOCOMMIT=0