5299966837
With FAIL, triggers choke but leave the changes in despite. We need to have the current statement undone, however.
8 lines
156 B
SQL
8 lines
156 B
SQL
CREATE TRIGGER x_paidFromBeginning
|
|
BEFORE INSERT ON Debit
|
|
BEGIN
|
|
SELECT RAISE(ABORT, "Debt must be initially unpaid")
|
|
WHERE NEW.paid <> 0;
|
|
END;
|
|
|