触发将插入的值复制到另一个显示错误的表

时间:2014-03-19 20:17:21

标签: triggers

我试图在phpMyAdmin中创建上述触发器,但它说:

'#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':new.student_delno,
           :new.student_name,
           :new.student_regn' at line 6 '

create trigger copy 
after insert on cards_table
for each row
begin
    insert into tblstudent
    values(:new.student_delno,
           :new.student_name,
           :new.student_regno,
           :new.student_mail,
           :new.student_phone,
           :new.student_college,
           :new.date_of_creation,
           :new.has_paid,
           :new.date_of_payment,
           :new.category);
end;

0 个答案:

没有答案