如何經過include標籤重用mybatis的代碼段

一、首先定義一個sql標籤,必定要定義惟一id<sql id="Base_Column_List" >name,age</sql>二、而後經過id引用<select id="selectAll">select <include refid="Base_Column_List" />    from student</select>這個<include refid="Base_Column_List" />會自動把上面的代碼貼過來。
相關文章
相關標籤/搜索