MySQL中大于等于小于等于的写法

由于在mybatis框架的xml中<= , >=解析会出现问题,编译报错,所以需要转译
第一种写法:

原符号 < <= > >= & ’ "
替换符号 < <= > >= & ' "
例如:sql如下:

unix_timestamp(target.mc_end_date)<= unix_timestamp(#{MonthEndTime});unix_timestamp(target.mc_start_date) >= unix_timestamp(#{MonthBeginTime})

第二种写法:
大于等于

= ]]>

小于等于

例如:sql如下:

mc_end_date = ]]> #{endTime} and  mc_start_date  #{startTime}

你可能感兴趣的:(数据库)