我在sqllog下建立的存储过程 ceshi
就是一条简单的查询语句  select
没有问题  
但是运行就会出现问题
call ceshi;错误码: 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 1mysql 服务器是 linux+mysql5.0.22
那位高手指点下小弟啊

解决方案 »

  1.   

    看不到你的语句。建议你直接到mysql的命令工具中试一下。排除你的工具的问题可能。另外建议提供尽可能多的信息,这样别人可以用你的例子在自己机器上模拟你的问题。问题说明越详细,回答也会越准确!参见如何提问。(提问的智慧
      

  2.   

    存储过程用
    call ceshi();调用
    记得加括号
      

  3.   

    给你个示例:
    mysql> delimiter //
    mysql> drop procedure if exists P_TEST//
    Query OK, 0 rows affected, 1 warning (0.03 sec)mysql> create procedure P_TEST()
        -> begin
        -> select * from tb_log;
        -> end;
        -> //
    Query OK, 0 rows affected (0.03 sec)
    调用:
    mysql> call P_TEST()//
    +------+---------------------+
    | id   | activetime          |
    +------+---------------------+
    |  100 | 2009-09-10 14:19:24 |
    +------+---------------------+
    1 row in set (0.00 sec)Query OK, 0 rows affected (0.00 sec)mysql> delimiter ;
    mysql>