<select id="selectStudentByCondition" resultType="Student">
select * from student where name like '%' #{namecon} '%' and age>#{agecon}
</select>
<select id="selectStudentByCondition2" resultType="Student">
select * from student where name like '%' #{0} '%' and age>#{1}
</select>
<select id="selectStudentByMap" resultType="Student">
select * from student where name like '%' #{nameCondition} '%'
and age> #{ageCondition}
</select>
<select id="selectStudentByConditions" resultType="Student">
select * from student where name like '%' #{0} '%' and age > #{1}
</select>
<select id="selectStudentIf" resultType="Student">
select * from student where 1=1
<if test="name !=null and name!=''">
and name like '%' #{name} '%'
</if>
<if test="age > 0">
and age > #{age}
</if>
</select>
<select id="selectStudentWhere" resultType="Student">
select * from student
<where>
<if test="name!=null and name!=''">
and name like '%' #{name} '%'
</if>
<if test="age>0">
and age>#{age}
</if>
</where>
</select>
select * from student where name like '%' #{namecon} '%' and age>#{agecon}
</select>
<select id="selectStudentByCondition2" resultType="Student">
select * from student where name like '%' #{0} '%' and age>#{1}
</select>
<select id="selectStudentByMap" resultType="Student">
select * from student where name like '%' #{nameCondition} '%'
and age> #{ageCondition}
</select>
<select id="selectStudentByConditions" resultType="Student">
select * from student where name like '%' #{0} '%' and age > #{1}
</select>
<select id="selectStudentIf" resultType="Student">
select * from student where 1=1
<if test="name !=null and name!=''">
and name like '%' #{name} '%'
</if>
<if test="age > 0">
and age > #{age}
</if>
</select>
<select id="selectStudentWhere" resultType="Student">
select * from student
<where>
<if test="name!=null and name!=''">
and name like '%' #{name} '%'
</if>
<if test="age>0">
and age>#{age}
</if>
</where>
</select>