当我尝试运行PREPARE语句时,我在存储过程中收到语法错误
显示以下错误
Syntax error near 'AreaID_var; DEALLOCATE PREPARE stmt1; END' at line 4
BEGIN
PREPARE stmt1 FROM 'SELECT * FROM Area_TBL WHERE Area_ID = ?';
EXECUTE stmt1 USING AreaID_var;
DEALLOCATE PREPARE stmt1;
END
答案 0 :(得分:0)
按如下方式更改执行行: -
EXECUTE stmt1 USING @AreaID_var;