【发布时间】:2013-08-14 06:00:36
【问题描述】:
这是我的存储过程,如果在文档详细信息中找到任何数据但它会生成错误,则返回 true
" #1064 - 您的 SQL 语法有错误;请查看与您的 MySQL 服务器版本相对应的手册,以获取正确的语法,以便在第 5 行的 '@result = true end if end' 附近使用"
create procedure abcde(out result boolean)
begin
if exists(select * from document_details)
then @result = true;
end if
end
请尽快给我解决方案
【问题讨论】:
-
@result 是用户定义的变量,而不是输出参数。我建议你阅读参考手册中的Variables in Stored Programs。
-
那么请建议我如何检索值作为输出参数的代码
标签: mysql stored-procedures exists