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 |
Tags
- ajax 사용 예시
- formgroup
- 스크롤 이벤트 감지
- TAILWIND
- 호버
- angular button
- scroll
- 앵귤러 모달
- ApexChart
- 옵저버블
- 스크롤 이벤트
- angular route
- flex-1
- summary
- egov spring ajax 사용 예시
- 셀렉트박스 커스텀
- Ionic modal
- 검색
- route
- Router
- prisma
- modal
- 모달
- Oracle LISTAGG 사용 예시
- Angular Router
- 앵귤러 애니메이션
- angular modal
- 아이오닉 스크롤 이벤트
- angular animation
- mysql if
Archives
- Today
- Total
깜놀하는 해므찌로
MyBatis MariaDB MySQL 검색 SQL 문 / 검색 SELECT 문 예시 / UPPER LOWER 본문
반응형
SMALL
<sql id="Where">
<if test="searchKeyword !=null and searchKeyword !=''">
<if test="searchCondition !=null and searchCondition !='' and searchCondition ==0">
AND (UPPER(AUTH_CODE) LIKE CONCAT('%',UPPER(#{searchKeyword}),'%') OR UPPER(AUTH_CODE_NM) like CONCAT('%',UPPER(#{searchKeyword}),'%'))
</if>
<if test="searchCondition !=null and searchCondition !='' and searchCondition ==1">
AND UPPER(AUTH_CODE) LIKE CONCAT('%',UPPER(#{searchKeyword}),'%')
</if>
<if test="searchCondition !=null and searchCondition !='' and searchCondition ==2">
AND UPPER(AUTH_CODE_NM) LIKE CONCAT('%',UPPER(#{searchKeyword}),'%')
</if>
</if>
</sql>
1. 대소문자 구분 없이 검색을 하기 위해 검색어 및 검색 대상 UPPER 함수 처리
2. 전체 (제목 + 내용) / 제목 / 내용 구분
반응형
LIST
'IT' 카테고리의 다른 글
JavaScript 현재 URL 가져오기 (0) | 2022.07.12 |
---|---|
Window Cmd 명령창 렘 클럭 한 줄로 확인하는 법 (0) | 2022.07.12 |
Oracle Length() 함수 사용 예시 / length 활용 숫자 자릿수 구하기 (0) | 2022.07.12 |
Oracle OVER() 함수 사용 예시 / OVER 함수 파라미터 개수 / Oracle length / Oracle RPAD() LPAD() (0) | 2022.07.12 |
MyBatis Oracle 마이바티스 오라클 foreach 사용 예시 / MyBatis collection 사용 예시 (0) | 2022.07.12 |