mybaits oracle 的like查询

<!-- 获取车辆类型列表 带分页 -->
	<select id="selectVehicleList" parameterType="java.util.HashMap" resultType="java.util.HashMap">
			Select t1.KEYID,
	           t1.NAME,
	           t1.RID,
	           t1.COLOR,
	           t1.VIN,
	           t1.ENGINENO,
	           t2.BRAND || '-' || t2.NAME  || '-' || t2.YEAR_MODEL || '-' || t2.CONFIG VTYPE,
	           t1.VRN,
	           t1.VNISSUE_DATE,
	           t1.VNVALIDITY,
	           t1.PURCHASE_DATE,
	           t3.NAME DEALER,
	           t1.LICENSE_TYPE,
	           t1.LICENSE_NUMBER,
	           t1.REMARK,
	           t1.LASTUPDATE,
	           t1.CREATE_TIME,
	           t1.ISDELETED
	      From T_TS_VEHICLE t1
	      left join T_TS_VEHICLE_TYPE t2
	      on t1.VTYPEID = t2.KEYID
	      left join T_TS_DEALER t3
	      on t1.DEALERID = t3.KEYID
	      WHERE
	      t1.ISDELETED = 0
	      <if test="vin != null">
	      	 AND t1.VIN like  '%${vin}%'
	      </if>
	</select>

你可能感兴趣的:(oracle)