Good afternoon, guys. I need to insert a record in the database but no duplication. I tried this:
create procedure My_Proc
as begin
if(not exists(select * from alunos where nome = 'Mateus')) then
insert into Alunos (Matricula, Nome, Idade, OBS)
values (6, 'Mateus', 5, 'É terrível');
end
Does not recognize the ';' at the end of the insert command. If I get the ';', it does not recognize the END. Does anyone know what's missing?
I'm using Flaming Robin.
NOTE: If I use execute block, the same errors happen.