How to Escape Characters in Oracle PL/SQL Queries 어떻게 오라클은 PL / SQL 쿼리에 등장하는 인물을 탈출하는
Oracle databases reserve some special characters with specific meaning and purpose within Oracle environment. 오라클은 오라클 데이터베이스의 구체적인 의미와 목적을 가진 환경 내에서 일부 특수 문자를 보유합니다. These reserved characters include _ (underscore) wild card character which used to match exactly one character, % (percentage) which used to match zero or more occurrences of any characters and ‘ (apostrophe or quotation mark) which used to mark the value supplied. 이러한 예약 문자를 포함 _ (밑줄), '(또는 인용 부호)에 아포 스트로피 가치를 표시하는 데 사용되는 모든 문자의 0 개 이상의 사건을 일치시키는 데 사용 (비율) % 정확히 하나의 문자와 일치하는 데 사용되는 와일드 카드 문자를 공급했다. These special characters will not be interpreted literally when building SQL query in Oracle, and may caused error in results returned especially when performing string search with LIKE keyword. 이러한 특수 문자 그대로 오라클에서 SQL 쿼리를 구축했을 때, 그리고 해석되지 않습니다 결과에 오류가 발생있습니다 문자열 검색을 수행할 때 특히 같은 키워드로 돌아왔다. To use these characters so that Oracle can interpret them literally as a part of string value instead of preset mean, escape character has to be assigned. 그렇게하는 대신 오라클은 말 그대로 미리 문자열 값의 일부로 해석할 수있는 말은 이러한 문자를 사용하려면, 문자 탈출을 할당할 수있다.
Oracle allows the assignment of special escape characters to the reserved characters in Oracle can be escaped to normal characters that is interpreted literally, by using ESCAPE keyword. 오라클은 오라클에 예약 문자를 특수 탈출 자의 임무는 일반 문자 그대로, 탈출의 키워드를 사용하여 해석됩니다 탈출이 될 수있습니다.
For example, to select the name of guests with _ (underscore) in it, use the following statement: 예를 들어, 다음 문을 사용하여 손님의 이름이 _ 그것에서는 (밑줄)을 선택합니다 :
SELECT guest_name FROM guest_table WHERE name LIKE ‘%\_%’ ESCAPE ‘\’; 선택 guest_name 같은 곳에서 '% 이름 guest_table \ _ %'ESCAPE '\';
Without specifying the \ (backslash) as escape clause, the query will return all guest names, making the unwanted results problem. \ (역슬래시 지정) 탈출 조항으로하지 않고, 쿼리, 원치 않는 결과가 문제를 만들고 모든 손님 이름을 반환한다.
The above syntax will not work on ‘ (quote). 위의 구문에 '(따옴표)가 작동하지 않습니다. To escape this quotation mark and to display the quote literally in string, insert another quote (total 2 quotes) for every quote that want to be displayed. 이 인용 부호 문자열에서 탈출하려면 말 그대로 인용 표시를, 또 다른 문구가 표시되고 싶은 모든 견적에 대한 (전체 2 따옴표 제외)를 삽입합니다. For example: 예를 들면 :
SELECT ‘This will display line with quote’’s word.’ FROM temp_table; '이 quote'의 단어와 함께 표시됩니다 라인'을 선택하십시오. temp_table까지;
SELECT ‘This will display ””double quoted”” word.’ FROM temp_table; '이 표시됩니다 ""선택을 두 번 ""단어가 전했다.'temp_table까지;
will return the following respectively: 다음은 각각 반환됩니다 :
This will display line with quote’s word. 이 문구의 단어로 라인이 표시됩니다.
This will display ”double quoted” word. 이 "더블"단어를 인용 표시됩니다.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 중요 :이 기계는 "보증도없이있는 그대로"제공됩니다 페이지를 번역했다. Machine translation may be difficult to understand. 기계 번역을 이해하기 어려울 수있습니다. Please refer to 을 참조하시기 바랍니다 original English article 원래 영어 문서 whenever possible. 언제든 가능합니다.
Share and contribute or get technical support and help at 공유와 기여하거나 기술 지원과에 도움이 My Digital Life Forums 내 디지털 생활 포럼 .
Related Articles 관련 기사
- Manual and Clean Uninstall Oracle for Windows 매뉴얼 및 청소를 제거 Windows 용 오라클
- Oracle Database Link Oracle 데이터베이스 링크를
- Oracle Database Import Error 3113/3114 Oracle 데이터베이스 가져오기 오류 3,114분의 3,113
- Oracle JDeveloper Reviews 오라클은 JDeveloper 리뷰
- Oracle PL/SQL ORA-00947 Not Enough Values Error 오라클은 PL / SQL 오라 - 00947 충분하지 않은 값 오류
- Change Oracle Database User Password 오라클 데이터베이스 사용자 비밀 번호 변경
- Check Oracle Version 오라클 버전 확인
- IMP-00016 Required Character Set Conversion Not Supported Error when Import to Oracle Database 임프 - 00016 필수 문자 집합 변환이 지원되지 Oracle 데이터베이스로 가져올 때 오류
- Oracle Business Activity Monitoring Reviews 오라클은 비즈니스 활동 모니터링 리뷰
- Insert Text Literal and Concatenation in Oracle SQL 텍스트 삽입 리터럴과 연쇄 오라클에서 SQL

































July 13th, 2007 19:27 2007년 7월 13일 19:27
[...] about Escape Characters. 이스케이프 문자 [...]. Escape Characters Oracle Wildcards Wildcard Characters Escape Character How to Escape Characters in Oracle PL/SQL Queries 이스케이프 문자는 오라클의 와일드 와일드 카드 문자를 이스케이프 문자 어떻게 오라클은 PL / SQL 쿼리에 등장하는 인물을 탈출하는
September 17th, 2008 20:44 9 월 17 일 2008 20:44
salut j’ai le mm pb ! 건배 j'ai 르 mm PB들의 전언이다! si je fait une recherche sur le ‘_’ seul sa marche mais si v je chercher des mots avec le ‘_’ 부천시 이인제 운명이 일개 공들인 쉬르 르와 '_'는 sa 마르쉐, 부천시 상세 seul 일 vs 이인제 chercher 르 데스 mots 슨에게 물어봐 '_'
exmple: exmple :
SELECT * from Test WHERE nom LIKE ‘1%\_%test’ ESCAPE ‘\’; * '1 % 테스트 이름처럼 어디에서 선택 \ _ % 테스트 'ESCAPE'\ ';
sa me renvoie : SA가 날 renvoie :
1_test
10_test ?? 10_test??
or que normalement sa devait rendre que: 나 알어? normalement에 sa devait rendre 일하러 :
1_test ?? 1_test??
je comprend pas 이인제 comprend 싶어서
September 26th, 2008 00:28 2008년 9월 26일 0시 28분
Thank you very much - I’ma SQL Server gent with an Oracle source and I was going nuts! 대단히 감사합니다 - 저는 신사 오라클 SQL 서버 소스와 함께 견과류를하려고 했어!