需求模拟:

 

从业务表中取关键字:

mysql模糊查询条件多表联查模板_lua

 

根据关键字模糊查询内容, 符合条件返回整条:

mysql模糊查询条件多表联查模板_sql_02

 

sql模板:

select
*
from
inf_order_evaluate as oe
where
oe.Content like CONCAT('%', (select PaintOrderTypeName from wor_paint_order_type where PaintOrderTypeId = 3), '%')

 

查询结果:

mysql模糊查询条件多表联查模板_知识_03