출처 : http://noct.pe.kr/noctbbs/ncontent.php?code=info&number=115&page=1&keyfield=&key=
[jsp][펌] pstmt에서 like에 bind variable 붙이기
from okjsp.pe.kr powerbox님 팁
powerbox 2003-10-07 11:34:58
[간단팁] pstmt에서 like에 bind variable 붙이기
ex) Oracle...select *
from user
where name like '%이%'
=> 보통 stmt쓸때죠...
select *
from user
where name like '%?%'
=> ORA-01006: bind variable does not exist
?는 반드시 '' 밖에 존재해야 합니다.
select *from user
where name like '%'||?||'%'
=> 오케바리~
'프로그래밍 > Servlet&JSP' 카테고리의 다른 글
| 스크립트나 html을 제거하는 정규식 (0) | 2008/10/16 |
|---|---|
| JAVA에서 엑셀 파일 읽고 쓰기 (0) | 2008/07/14 |
| IP 가져오기 (0) | 2008/01/28 |
| MultipartRequest 를 이용한 파일업로드 강좌 (0) | 2008/01/27 |
| PrepareStatement 를 쓸때 쿼리작성시 주의점 (0) | 2007/12/26 |
| 오라클 clob 예제 (2) | 2007/12/17 |

