Exercises: Functions, Triggers and Transactions - задача 12.Deposit Money
Защо ми дава само 40 точки в judge? Какво ли не пробвах.
CREATE PROCEDURE usp_deposit_money(a_account_id INT(11), money_amount DECIMAL(65,4))
BEGIN
START TRANSACTION;
IF(money_amount<=0 OR money_amount IS NULL OR a_account_id IS NULL OR a_account_id<1) THEN ROLLBACK;
ELSE
UPDATE accounts
SET balance = balance + money_amount
WHERE id = a_account_id;
END IF;
END