为什么即使表包含匹配数据,MYSQL Procedure也会返回NULL值?

时间:2018-03-31 08:56:29

标签: mysql procedure

ID  CName
---------
101 India
102 Australia
103 Canada


DELIMITER \\
create procedure getCountry(in val varchar(20), out ctry varchar(20))
begin
    select Country.CName into ctry from test.Country where Country.CName like CONCAT('%',@val,'%');
end;


call getCountry('aus',@ctr);
select @ctr;

为什么@ctr显示我的NULL值,即使我的表包含印度!!当我通过' aus'在调用程序!!请帮忙

0 个答案:

没有答案