Create a trigger that automatically enrolls a student in "BD I Laboratory" as soon as it is enrolled in "Database I".
use Universidade;
insert into Realiza_matricula (RGAacad, Nomedisc) values(20179474911, 'Banco de Dados I');
Delimiter $$
create trigger matricula
after insert on Realiza_matricula
for each row
BEGIN
IF (select * From Realiza_matricula Where Nomedisc = 'Banco de Dados I') THEN
insert into Realiza_matricula values (NEW.RGAacad, 'Laboratorio de BD I', OLD.Date);
end if;
END $$
Delimiter;