首页 > 代码库 > ibatis配置mysql的limit

ibatis配置mysql的limit

<select id="xxx" >     select * from xxx    <dynamic prepend = "limit " >         <isNotEqual property="num" compareValue="0" >             0,#num#         </isNotEqual>     </dynamic> </select>

或者

<select id="xxx">    select * from xxx    <dynamic prepend="limit">         <isNotNull property="rowStart">         <isNotNull property="pageSize">             #rowStart#, #pageSize#         </isNotNull>         </isNotNull>     </dynamic> </select>