mybaties实体的 Mapper.xml文件中自定义sql时模糊查询的写法

<select  id=selectByNameLike" parameterType="string" resultMap="BaseResultMap">

  SELECT
      *
  FROM
      a
  LEFT JOIN b ON a.bid = b.id
  WHERE
      a.NAME LIKE concat ("%", #{name},"%")

<select>

 

posted @ 2018-11-29 10:03  戈博折刀  阅读(2640)  评论(0编辑  收藏  举报