2
Good afternoon guys. I need to enter a record in the database but no duplicates. 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 take the ';', it does not recognize the END. Someone knows what’s missing ?
I’m wearing the Flaming Robin.
NOTE: If I use the execute block, the same errors happen.
Thank you very much, it helped a lot, only in place of create Procedure I used a execute block. Now I understand why it has syntaxes that work in Flame Robin and do not work in my projects and vice versa. Vlw vein !
– user36793