我是靠谱客的博主 沉静棒棒糖,这篇文章主要介绍MySQL模糊查询带%的进行查询,现在分享给大家,希望可以做个参考。

 <sql id="queryCondition">
<if test="query != null">
<if test="query.id != null and query.id != 0">
and ID = #{query.id}
</if>
<if test="query.model != null and query.model != 0">
and model_id in (select id from aircraft_model where id = ${query.model})
</if>
<if test="query.registerCodeLike != null and query.registerCodeLike != ''">
 and registerCode like '%/${query.registerCodeLike}%' ESCAPE '/'
</if>
<if test="query.usableStatusIs != null">
and usableStatus = #{query.usableStatusIs}
</if>
</if>
</sql>

最后

以上就是沉静棒棒糖最近收集整理的关于MySQL模糊查询带%的进行查询的全部内容,更多相关MySQL模糊查询带%内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(133)

评论列表共有 0 条评论

立即
投稿
返回
顶部