Complete the code to start a transaction in MySQL.
START [1];The START TRANSACTION command begins a new transaction block in MySQL.
Complete the code to save changes permanently in a transaction.
[1];The COMMIT command saves all changes made during the transaction permanently to the database.
Fix the error in the code to undo changes in a transaction.
[1];The ROLLBACK command undoes all changes made in the current transaction, restoring the database to its previous state.
Fill both blanks to create a savepoint and rollback to it.
SAVEPOINT [1]; ROLLBACK TO [2];
A savepoint named sp1 is created, and then the transaction rolls back to that savepoint, undoing changes after it.
Fill all three blanks to start a transaction, update a value, and commit the changes.
START [1]; UPDATE accounts SET balance = balance [2] 100 WHERE id = 1; [3];
This code starts a transaction, adds 100 to the balance of account with id 1, and then commits the changes to save them.