MySQL Forums
Forum List  »  Triggers

Can't create the trigger i always get an error.
Posted by: Jorge Diaz
Date: September 11, 2012 11:54AM

Hello guys, Im new here and i have never used triggers in Mysql, this is the first time, and im having problems migrating one trigger from sql server to mysql, i always get an error when i try to create it, this is the trigger im trying to create in mysql:

create trigger insertarAccesos after insert on perfil
for each row begin
declare @Perfil varchar(30),
set @Perfil = (Select idPerfil from perfil),
insert into Acceso values(@Perfil,0,0,0,0,0,0,0)
end;

And it says i have some problems with te sintax, can anyone help me please? thanks in advance.



Edited 1 time(s). Last edit at 09/11/2012 11:54AM by Jorge Diaz.

Options: ReplyQuote


Subject
Views
Written By
Posted
Can't create the trigger i always get an error.
1945
September 11, 2012 11:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.