Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- MYSQL
- 전자정부 표준프레임워크
- 이클립스
- 호환성
- maven
- switch
- java
- JSTL
- html
- 한글
- checbox
- HTML5
- SSL
- null
- 날짜
- 스크립트
- 톰캣
- 웹 플랫폼 설치 관리자
- RADIO
- Oracle
- 오라클
- spring form tag
- DB
- json
- 네이버스마트 에디터
- @RequestBody
- jquery
- php
- 문자열
- exception
Archives
- Today
- Total
개인적인 정리
LIKE 사용법 본문
오라클은
like '%'||#value#||'%'
Mysql은
like concat('%','#value#','%')
Sysbase, SQL SERVER
like '%' + #value# + '%'
예제)
<![CDATA[
SELECT COUNT(*) AS CNT
FROM
aaaaaa A,
bbbbbbbb B
WHERE A.aaa = B.bbb
]]>
<isNotEmpty property="searchKeyword" prepend=" AND ">
$searchCondition$ LIKE CONCAT('%',#searchKeyword#,'%')
</isNotEmpty>
<![CDATA[
SELECT * FROM (
SELECT
aaaaa
bbbbbbbbb
FROM
aaaaaaaaaaaaaaa A,
bbbbbbbbbbbbbbb B
WHERE
A.aaaa = B.bbbb
ORDER BY aaaa DESC
)Z
WHERE 1=1
]]>
<isNotEmpty property="searchKeyword" prepend=" AND ">
$searchCondition$ LIKE CONCAT('%',#searchKeyword#,'%')
</isNotEmpty>
<![CDATA[
ORDER BY aaaaaa DESC LIMIT #firstIndex#, #recordCountPerPage#
]]>
'DB > MYSQL-IBATIS' 카테고리의 다른 글
[MySQL] SELECT list is not in GROUP BY clause and contains nonaggregated column '테이블명.필드명' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (0) | 2021.07.14 |
---|---|
GROUP_CONCAT (0) | 2018.12.27 |
mysql ibatis like 검색 (0) | 2018.12.04 |
mysqldump: Couldn't find table: (0) | 2018.04.30 |
mysql 백업 및 복구 (0) | 2018.02.18 |
Comments