I need to create triggers for an exercice, i have 3 tables, which one have one int argument and i want to create this trigger:
CREATE TRIGGER D1_1 BEFORE INSERT ON T1 FOR EACH ROW
WHEN((SELECT COUNT(*) FROM T2) < 1)
INSERT INTO T2 VALUES(6)
END;
Syntaxe error near THEN..
Thank you!