![]() |
Show 150 posts per page |
.dsy:it. (http://www.dsy.it/forum/)
- Basi di dati ~ comunicazione digitale (http://www.dsy.it/forum/forumdisplay.php?forumid=108)
-- [Dubbi] esercizi trigger (http://www.dsy.it/forum/showthread.php?threadid=23665)
[Dubbi] esercizi trigger
ciao, volevo avere un parere su questo trigger dato in un esame tempo fa di mazzoleni:
questo è il db:
Studenti(Matr#, Nome, Cognome, Indirizzo);
Prerequisiti(Corso#,CorsoRichiesto#)
Esami(Matr#,Corso#,Data,Voto)
Lauree(Data, Matr#, Voto);
questo è il trigger da fare:
Scrivere un trigger che cancelli tutti i dati relativi ad uno studente in seguito alla laurea dello
stesso.
questo è il mio sviluppo.. non ne so molto ditemi se ci sta o se è na cacata..
grazie.
Create or replace trigger laureapresa
after insert on Lauree
DELETE FROM Studenti WHERE studenti.Matr# = new.Matr#
DELETE FROM Esami WHERE esami.Matr# = new.Matr#;
secondo me e' giusto!
le cose quando sono semplici sembrano facili...
All times are GMT. The time now is 16:27. | Show all 2 posts from this thread on one page |
Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.