8 lines
160 B
SQL
8 lines
160 B
SQL
CREATE TRIGGER x_spentFromBeginning
|
|
BEFORE INSERT ON Credit
|
|
BEGIN
|
|
SELECT RAISE(FAIL, "credit must be initially unused")
|
|
WHERE NEW.spent != 0;
|
|
END;
|
|
|