출처 : 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 '%'||?||'%'

=> 오케바리~

+ Recent posts