为什么这不起作用?
DELIMITER ;//
CREATE PROCEDURE `blah`
(
SearchText varchar(4000)
)
BEGIN
SELECT *
FROM table_name
WHERE table_name.StringField LIKE '%' + SearchText + '%'; -- This is where the code is breaking
END;//
答案 0 :(得分:4)
尝试使用:
CONCAT('%', SearchText ,'%')