Mybatis @select like传值问题

巧用CONCAT拼接:

SELECT    
b.id,    
b.title,    
b.subtitle,    
b.num,    
b.descr,    
b.img,    
b.info,    
b.f_price AS price    
FROM product b   
WHERE b.status=1 AND b.i_shelf=2 AND b.title LIKE CONCAT('%','面膜','%')  
ORDER BY b.sort ASC

转载于:https://my.oschina.net/yuantangxi/blog/3081675

你可能感兴趣的:(java)