-2

我试图创建这个存储过程:

CREATE PROCEDURE GetExif 
(
IN @album VARCHAR(50), 
IN @pic VARCHAR(50)
)
BEGIN

SELECT CAMERA, 
FSTOP, 
EXPOSURE, 
ISO, 
FOCALLENGHT, 
DATETAKEN, 
GPSLATH, 
GPSLONG
FROM EXIF
WHERE ALBUMNAME = @album 
AND PICTURENAME = @pic

END

我收到这个错误

#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 '@album VARCHAR(50),  IN @pic VARCHAR(50) ) BEGIN

SELECT CAMERA,  FSTOP,  ' at line 3

选择工作正常。

MySql Serverversion 是 5.0.51a-log

删除@s 后我收到此错误

#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 20 
4

1 回答 1

4

你读过说明书吗?参数名称不应该@在它们前面。

于 2009-11-13T21:28:46.103 回答