[英]Parameters in stored procedures in mysql
在这里,当我传递正确和不正确的值时,两次都得到4
当我执行此查询时
select Count(*) into result
from document_details
where document_name = name
and document_path = path;
然后它向我显示了正确的答案是1.请尽快帮助我。 先感谢您!!
create procedure check_status(IN name INT(30),IN path INT(255))
BEGIN
declare result int;
set result = 0;
select Count(*) into result from `document_details` where `document_name`=name and `document_path`=path;
select result;
END
如果类型正确,则不应该使用工作ID,然后更改为ie (name CHAR(30),path CHAR(255))
create procedure check_status(name INT(30),path INT(255))
BEGIN
select Count(*) as result from `document_details`
where `document_name`=name and `document_path`=path;
END;
在程序中,函数中没有IN
/ OUT
,有...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.