Home  >  Article  >  Database  >  mysql-Mysql存储过程中怎么判断传入参数与自定义字符串的值相等(新人求助)

mysql-Mysql存储过程中怎么判断传入参数与自定义字符串的值相等(新人求助)

WBOY
WBOYOriginal
2016-06-06 09:36:422434browse

字符串mysql存储

CREATE DEFINER=root@localhost PROCEDURE kkk(biaoshi varchar(10))
BEGIN
set @count="1";
if(biaoshi.equals(@count)) then
select 2;
else
select 1;
end if;
END

系统报错
:21:52:28 call kkk('1') Error Code: 1305. FUNCTION biaoshi.equals does not exist 0.000 sec

@count为自定义的字符串
biaoshi为传入的字符串
目的:怎么判断@count与biaoshi是否相等后输出2
不相等后 输出1

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn