被坑了两次,记录加深记忆
oracle :
select * from table_name where 1=1
p.p1 { margin: 0; font: 14px Monaco }
span.Apple-tab-span { white-space: pre }
<#if secondName?has_content>
and second_name like ‘%’||:secondName||’%’
</#if>
mysql:
select * from table_name where 1=1
<#if secondName?has_content>
and second_name like concat(‘%’, :second_name ,’%’)
</#if>
转载请注明:IT运维空间 » 业内资讯 » mysql oracle sql like模糊查询的条件拼接
发表评论