Rumah >pangkalan data >tutorial mysql >mysql 创建存储过程时,select语句 like中引用变量如何引用?
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是变量 如何插入进去?