Coding task · SQL and MySQL course · Module 11: Capstone project
A safe change inside a transaction
Wrap an operation in a transaction so you can undo it if needed.
Task
Write three statements: start a transaction with START TRANSACTION;, then set cena to 25.00 for the book with id 3 (UPDATE ksiazki SET cena = 25.00 WHERE id = 3;), and finally confirm the changes with COMMIT;.