Transaction feature suitable to be used in 2 conditions.
- If you have multiple statements to run and want to ensure all of them run successfully to conclude the task.
- If you want to run a delete command, and want to ensure everything is ok before commit.
How to use
run TRANSACTION or BEGIN command
then run other statement as usual
then you have option to ROLLBACK; or to COMMIT;