No parameters defined during prepareCall()

语句如下:

 SELECT * FROM TEST WHERE TEST_NAME LIKE '%?%'

修改成

SELECT * FROM TEST WHERE TEST_NAME LIKE CONCAT('%',?,'%')

即可

concat(var1,var2,.....)mysql中特有的拼接字符串的方式





你可能感兴趣的:(No parameters defined during prepareCall())