<select id="test1" parameterType="string" resultType="string">
select to_timestamp('2022-10-10 15:15:15', 'yyyy-mm-dd hh24:mi:ss')
+ interval #{value} year -- years X , year O
</select>
<select id="test2" parameterType="string" resultType="string">
select to_timestamp('2022-10-10 15:15:15', 'yyyy-mm-dd hh24:mi:ss')
+ interval #{value} month -- months X , month O
</select>
<select id="test3" parameterType="string" resultType="string">
select to_timestamp('2022-10-10 15:15:15', 'yyyy-mm-dd hh24:mi:ss')
+ interval #{value} day -- days X , day O
</select>
<select id="test4" parameterType="map" resultType="string">
select to_timestamp('2020-10-10 10:10:10', 'yyyy-mm-dd hh24:mi:ss')
+ interval #{year} year
+ interval #{month} month
+ interval #{day} day
+ interval #{hour} hour
+ interval #{minute} minute
+ interval #{second} second
</select>