The final lesson. Stored procedures and functions let you encapsulate SQL logic on the server. Transactions ensure multi-step operations either fully succeed or fully roll back. Triggers automate actions on data changes.
1-A 2-A 3-A 4-A | 5 COMMIT 6 nothing 7 = START TRANSACTION; UPDATE a SET bal=bal-100...; UPDATE b SET bal=bal+100...; COMMIT; 8 = If any step fails midway - nothing is applied 9 = Function returns a value in queries; procedure performs actions when CALLed | 10 = Atomicity, Consistency, Isolation, Durability