DB2 与mysql sql语句对此
DB2语法与mysql语法比较
模糊搜素:
mysql: concat (‘%’,#{***},‘%’)
DB2:like ‘%‘|| #{***}||‘%’
dateRange时间段选择:
mysql: <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 --> and date_format(***,%y%m%d)>=date_format(#{beginTime},%y%m%d) </if> <if test="endTime != null and endTime != ''"><!-- 结束时间检索 --> and date_format(***,%y%m%d)<=date_format(#{endtime},%y%m%d)
DB2: <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 --> and **** >= #{beginTime} </if> <if test="endTime != null and endTime != ''"><!-- 结束时间检索 --> **** <= #{endTime} </if>

浙公网安备 33010602011771号