일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 운정
- 잡토이 메이킹 코딩 학원
- 잡토이
- 코딩
- 리브레캐드
- 시작하기
- jsp
- 안드로이드
- MSSQL
- 오라클
- 라즈베리파이
- 강좌
- html5
- 예제
- s4a
- 스크래치
- 아두이노
- jobtoy
- 유니티
- 설치
- Spring Security
- Unity
- 설정
- tomcat
- oracle
- 파주
- Android
- mysql
- librecad
- 톰캣
- Today
- Total
목록programming/mybatis (3)
랩제이
[mybatis] IN qeury 사용하기 * java List cat_mall_id_list = new ArrayList(); // mall id cat_mall_id_list.add(temp[i]); LibroCatalogue libroCatalogue = new LibroCatalogue(); if(cat_mall_id_list.size()!=0) { libroCatalogue.setCat_mall_id_list(cat_mall_id_list); } libroCatalogueService.getAll(libroCatalogue); * xml (mybatis) ... AND CAT_MALL_ID IN #{item} * xml (ibatis) a.DT_CODE IN #dt_code_in[]# [myba..
[mybatis] where 1=1 는 로 바꾸어 주세요 ibatis에서는 where 조건에서 where 1=1 이란 것을 이용하여 AND에 대한 조건을 주었었다. (꽁수) 하지만 mybatis에서는 란게 생겨서 이젠 (꽁수)를 쓸 필요가 없게 되었다. AND A.WB_MON = #{curMonth} AND A.WB_MON = #{curMonth} 여기서 또 헤깔리는 것은 AND a=1 에서 AND를 어떻게 하느냐다 바로 아래에 들어가는 인데 거기다가 AND를 쓰면 WHERE AND a=1 가 되어 버리는게 아닌가 하고 고민한다. 다행히도 mybatis에서 알아서 AND를 제외해 준다. 참 개발하기 편해졌다. ^^ [mybatis] where 1=1 는 로 바꾸어 주세요
[mybatis] order by 동적 쿼리 다음처럼 하면 order by를 동적으로 삽입 할 수 있다. * java String orderKind = "wbsalecount"; Map condition = new HashMap(); condition.put("orderKind" , orderKind ); * mybatis ... A.WB_RANK ASC A.WB_SALE_COUNT DESC ... [mybatis] order by 동적 쿼리