questo è li mio trigger nel file esempio2.sql l'ho midificato ma non cambia la situazione
codice:
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 ;
questo è l'output
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
dove sbaglio?
p.s. l'attributo tipo esiste