<!--根据多个id -->
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<!--日期截取 指定的 -->
select
EXTRACT(YEAR FROM createDate) as createYear,
EXTRACT(MONTH FROM createDate) as createMonth,
EXTRACT(DAY FROM createDate) as createDay from table where id = 1
结果:
createYear -- 2019
createMonth -- 11
createDay -- 12
<!--mybatis转义符号 -->
<![CDATA[ 符号 ]]>
<!--清空表里的数据 不删除表 -->
TRUNCATE table
<!--查询指定日期区间 -->
AND (#{date} BETWEEN field1 AND field2)
标签:createMonth,--,createDate,标题,名字,mybatis,table,EXTRACT
From: https://www.cnblogs.com/srjx/p/16722691.html