我有个存储过程A,要在after insert条件后调用

解决方案 »

  1.   

    You tried to execute an empty string .Please type an SQL comand into SQL edite field and execute again.这个错误是什么情况
      

  2.   

    drop trigger if exists A;
    create trigger A
    after insert on B
    for each row
    begin
    call Compare();
    end;
      

  3.   

    存储过程没有传入参数
    我直接call Compare()能执行的
      

  4.   

    你可以先测试一下 call Compare(); 这个直接调用是否正常?另外你的这个错误信息是什么时候发生的? 插入一条记录后就发生?
      

  5.   

    select 变量名即可显示
    在SP中加入select 变量名
      

  6.   

    我也遇到这个问题了 
    DELIMITER $$DROP PROCEDURE IF EXISTS `sq_youpin`.`print`$$CREATE PROCEDURE `print` (info varchar(1024))
     
        BEGIN
    select info;
        END$$DELIMITER ;
    call print('hello world');显示没问题 
    drop trigger if exists trg_pay_insert;
    create trigger trg_pay_insert
    after insert on pay
    for each row
    begin
        call print('hello');
    end;创建的时候报错:Error Code : 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 '' at line 5
    (0 ms taken)Error Code : 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 'end' at line 1
    (0 ms taken)
      

  7.   

    mysql触发器当中不能直接用call调用存储过程,只能把存储过程的代码贴上去