questo è li mio trigger nel file esempio2.sql l'ho midificato ma non cambia la situazione
questo è l'outputcodice:delimiter // create trigger insert_tipo after insert on Utenti for each row begin if (utenti.tipo <> 'user') or (utenti.tipo <> 'admin') then update utenti set utenti.tipo = 'user'; end if; end; // delimiter ;
dove sbaglio?codice:ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update utenti set utenti.tipo = 'user'' at line 6 ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'end if' at line 1 ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'end' at line 1
p.s. l'attributo tipo esiste

Rispondi quotando