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 |
Tags
- HTML5
- switch
- checbox
- 네이버스마트 에디터
- 스크립트
- JSTL
- 문자열
- SSL
- @RequestBody
- java
- html
- 이클립스
- spring form tag
- 톰캣
- exception
- jquery
- null
- maven
- RADIO
- DB
- 한글
- 웹 플랫폼 설치 관리자
- 전자정부 표준프레임워크
- MYSQL
- 호환성
- 날짜
- json
- Oracle
- 오라클
- php
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