2013-05-25 4 views
-2
delimiter/
create trigger nuovoattore 
after insert on attori 
for each row 
when (1970 > (select year(AnnoNascita) 
       from attori 
       where cod_attore=new.cod_attore)) 
begin 
delete from attori 
where cod_attore=new.cod_attore; 
end;/ 
+0

선생님 그가의 xD 나 NO로 MySQL의 downvoto에서 지원 말할 때 – javierZanetti

답변

1

WHEN 절이 없습니다. 시도 :

delimiter/
create trigger nuovoattore 
after insert on attori 
for each row 
begin 
    if 1970 > (select year(AnnoNascita) 
       from attori 
       where cod_attore=new.cod_attore) 
    then 
     delete from attori 
     where cod_attore=new.cod_attore; 
    end if; 
end;/