我在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
那位高手指点下小弟啊
就是一条简单的查询语句 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
那位高手指点下小弟啊
call ceshi();调用
记得加括号
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>