数据库
首页 > 数据库> > MyBatis-06-动态SQL

MyBatis-06-动态SQL

作者:互联网

十、动态SQL

10.1 构造实验环境

10.2 if

10.3 choose (when, otherwise)

10.4 trim (where, set)

10.5 SQL片段

10.6 foreach

<select id="selectPostIn" resultType="domain.blog.Post">
  SELECT *
  FROM POST P
  WHERE ID in
  <foreach item="item" index="index" collection="list"
      open="(" separator="," close=")">
        #{item}
  </foreach>
</select>

标签:map,06,author,title,blog,BlogMapper,session,SQL,MyBatis
来源: https://www.cnblogs.com/primabrucexu/p/13950289.html