mybatis in between ... and ... and explain written statements

In mysql, there needs to be a lot of time time to time the query conditions, between ... and ... for most of this situation.
The following query time of writing:

<select id="timeSelect" resultMap="BaseResultMap">
        SELECT COUNT(*) FROM 表名
		<where>
            ActionTime between #{startTime} and #{endTime}
		</where>
    </select>

explain:

ActionTime between # {startTime} and # {endTime}
is equivalent to:
ActionTime> = ActionTime and the startTime <= endTime
such a means is very simple.

Guess you like

Origin blog.csdn.net/fight252/article/details/91971782