di questi mi lascia perplessa pure il when... non dovrebbe essere una cosa tipocodice:create trigger RA5_1 after insert on prenotazione for each row when (tipo = "Intero") update prenotazione set New.prezzo = (select prezzoIntero from messaInScena where (data = New.dataSpettacolo and ora = New.oraSpettacolo and spazio = New.spazioSpettacolo)) where (dataSpettacolo = New.dataSpettacolo and oraSpettacolo = New.oraSpettacolo and spazioSpettacolo = New.spazioSpettacolo and numero = New.numero); create trigger RA5_2 after insert on prenotazione for each row when (tipo = "Ridotto") update prenotazione set New.prezzo = (select prezzoRidotto from messaInScena where (data = New.dataSpettacolo and ora = New.oraSpettacolo and spazio = New.spazioSpettacolo)) where (dataSpettacolo = New.dataSpettacolo and oraSpettacolo = New.oraSpettacolo and spazioSpettacolo = New.spazioSpettacolo and numero = New.numero); create trigger RA5_1 after insert on prenotazione for each row when (tipo = "Studenti") update prenotazione set New.prezzo = (select prezzoStudenti from messaInScena where (data = New.dataSpettacolo and ora = New.oraSpettacolo and spazio = New.spazioSpettacolo)) where (dataSpettacolo = New.dataSpettacolo and oraSpettacolo = New.oraSpettacolo and spazioSpettacolo = New.spazioSpettacolo and numero = New.numero);
CASE espressione
WHEN valore THEN risultato
ELSE risultato_default
END