mybatis like的用法
oracle数据库:
- SELECT
- *
- FROM
- user
- WHERE
- name like CONCAT('%',#{name},'%')
或
- SELECT
- *
- FROM
- user
- WHERE
- name like '%'||#{name}||'%'
SQLServer数据库:
- SELECT
- *
- FROM
- user
- WHERE
- name like '%'+#{name}+'%'
mysql数据库:
- SELECT
- *
- FROM
- user
- WHERE
- name like CONCAT('%',#{name},'%')
DB2数据库:
- SELECT
- *
- FROM
- user
- WHERE
- name like CONCAT('%',#{name},'%')
或
- SELECT
- *
- FROM
- user
- WHERE
- name like '%'||#{name}||'%'
posted on 2016-02-01 11:14 nevergiveupzeng 阅读(453) 评论(0) 编辑 收藏 举报