Sql查询 - MySql错误意外IDENT_QUOTED

时间:2014-11-14 19:52:55

标签: mysql database triggers

当错误IDENT_QUOTED出现在语句“temp entiresponsavel%ROWTYPE;”中时,我正在为大学工作编写SQL触发器。在下面的代码中。 我正在使用MySql 5.5。有谁知道为什么会这样?

CREATE TRIGGER `Responsavel` 
BEFORE INSERT ON `exposicao` 
FOR EACH ROW
begin
    declare
    entiresponsavel cursor for (select nome from Museu);
    temp entiresponsavel%ROWTYPE;
    open entiresponsavel;
    while (entiresponsavel%found) loop
        begin
            fetch from entiresponsavel into temp; 
            if (new.entidade_respon = temp)
                begin
                    SET new.curadorExpo = pessoa(temp);
                end if;
        end loop;
    close entiresponsavel;
end;

谢谢!

0 个答案:

没有答案