Question 9 of 10Pro Only
How do you use transactions in a SQL database? Explain with a concrete use case example.
Sample answer preview
A transaction is a group of SQL operations that execute as an atomic unit. Either all operations succeed and are committed, or they are all rolled back. The basic syntax uses BEGIN to start the transaction, COMMIT to save the changes, and ROLLBACK to cancel them.
BEGINCOMMITROLLBACKisolationREAD COMMITTEDSERIALIZABLE