Mybatis 中 refid是什么意思

1、首先定义一个sql标签,一定要定义唯一id 

      例:<sql  id="Base_Column_List" > name,age </sql>
2、然后通过id引用
<select id="selectAll">
 select
   <include refid="Base_Column_List" />
 from student
</select>
这个<include refid="Base_Column_List" />会自动把上面的代码贴过来 

本博文来源于:https://blog.csdn.net/lzh578903779/article/details/71158323/

posted @ 2019-10-10 12:31  活出自己范儿  Views(3447)  Comments(0Edit  收藏  举报