LIKE 대신 IS NULL을 이용


SELECT *
FROM 테이블
WHERE 조건1 = :PARAM OR :PARAM IS NULL
AND 조건2 = 'ABC'
AND 조건3 = 'DEF'

쓸데 없이 LIKE 쓰기보단 조건을 걸어서 처리하자.
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2010/07/28 17:50 2010/07/28 17:50
Response
No Trackback , No Comment
RSS :
http://shiftkey.org/rss/response/277


블로그 이미지

Shiftkey가 살아가는 이런 저런 이야기......

- shiftkey

Notices

Archives

Authors

  1. shiftkey

Calendar

«   2012/05   »
    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    

Site Stats

Total hits:
161236
Today:
17
Yesterday:
243