- <select id="findList" resultType="DwfxGzysxl">
- SELECT
- *
- FROM a
- <where>
- <if test="name != null and name != ''">
- AND a.name LIKE
- <if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
- <if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
- <if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
- </if>
- </where>
- </select>
3种数据库的xml模糊查询
最新推荐文章于 2024-04-22 11:32:24 发布