如果存在值就会返回true,如果不存在就返回false
<select id="ifExist" parameterType="string" resultType="boolean">
<![CDATA[ select count(id) from web_member where name = #{name} ]]>
</select>
<!-- 注意要用count ,因为count能找出条数,根据条数判断 返回false 还是true, 0为false-->
如果存在值就会返回true,如果不存在就返回false
<select id="ifExist" parameterType="string" resultType="boolean">
<![CDATA[ select count(id) from web_member where name = #{name} ]]>
</select>
<!-- 注意要用count ,因为count能找出条数,根据条数判断 返回false 还是true, 0为false-->