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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 09:40:24
Original
1623 people have browsed it

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是变量 如何插入进去?

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template