当前位置:Gxlcms > 数据库问题 > sql like模糊查询的条件拼接

sql like模糊查询的条件拼接

时间:2021-07-01 10:21:17 帮助过:64人阅读

  and second_name like ‘%‘||:secondName||‘%‘

</#if>

 

mysql:

 select * from table_name where 1=1 

 <#if secondName?? && secondName?has_content> 

  and second_name like concat(‘%‘, :second_name ,‘%‘)

</#if>

sql like模糊查询的条件拼接

标签:dna   clear   拼接   rac   where   gpo   like   pos   post   

人气教程排行