This illustration shows the SQL statement for the banking transaction example. The statement is divided into four blocks:
The SQL statement for the Decrement Savings Account is as follows:
UPDATE savings_accounts
The SQL statement for the Increment Checking Account is as follows:
UPDATE checking_accounts
The SQL statement for Record in Transaction Journal is as follows:
INSERT INTO journal VALUES
The SQL statement for End Transaction is as follows:
COMMIT WORK;