mybatis中include以及sql的用法

<select  id="findCustomer"  parameterType="String"   resultType="cn.itcast.util.Customer">
<include refid="selectCus"></include>
</select>

<sql id="selectCus">
select *  from cst_customer  where cst_id like CONCAT(CONCAT('%',#{VALUE},'%'))
</sql>

sql标签中放的是sql语句,可以通过include标签进行引用

猜你喜欢

转载自blog.csdn.net/bingguang1993/article/details/81143593