je fait les trigger sur une table,je voudrais tester comment fonctionner sur les table.
.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 CREATE OR REPLACE TRIGGER InsertPersonne BEFORE INSERT ON Personne FOR EACH ROW DECLARE Nb INT; BEGIN SELECT MAX(NP)+1 INTO Nb FROM Personne; IF(Nb IS NULL) THEN Nb:=1; END IF; :NEW.NP:=Nb; END;
RUN
ça fonctionne,et comment je peux tester??
Partager