Home >Database >Mysql Tutorial >mysql 创建存储过程时,select语句 like中引用变量如何引用?

mysql 创建存储过程时,select语句 like中引用变量如何引用?

WBOY
WBOYOriginal
2016-06-06 09:40:241586browse

mysqllike存储过程select语句

附代码:
delimiter//

DROP PROCEDURE IF EXISTS M_DNAME //
CREATE PROCEDURE M_DNAME
(MONTH VARCHAR(2))
SELECT INCOME.CID,COUNT(*) COUNTS FROM INCOME WHERE TIME LIKE '______MONTH%';
//

delimiter ;
如上 like中的MONTH是变量 如何插入进去?

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