mybatis oracle 模糊查询like

  <select id="countFarmerInfoListByListId" resultType="int">
        select
        count(1) from AIMS_FRAMER_INFO
        where id_aims_list_info = #{listInfoId,jdbcType=VARCHAR}
        and create_by = #{userId,jdbcType=VARCHAR}
        <if test="farmerName !='' and farmerName !=null">
            and frame_name like concat(concat('%',#{farmerName,jdbcType=VARCHAR}),'%')
        </if>
    </select>

猜你喜欢

转载自blog.csdn.net/yjw1007020425/article/details/79550876