在这里,当我传递正确且不正确的值时,我得到的结果都是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
答案 0 :(得分:0)
如果IF类型没问题,那么它应该不能工作,然后改为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
......