How to Escape Characters in Oracle PL/SQL Queries कैसे Oracle पी एल / SQL प्रश्न में वर्ण बचने के लिए
Oracle databases reserve some special characters with specific meaning and purpose within Oracle environment. Oracle डेटाबेस विशिष्ट अर्थ और Oracle वातावरण में उद्देश्य के साथ कुछ विशेष अक्षर सुरक्षित रखते हैं. 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. इन आरक्षित अक्षर शामिल _ (जांच) वाइल्ड कार्ड चरित्र है जो वास्तव में एक चरित्र से मेल,% (प्रतिशत) है जो किसी भी अक्षर के शून्य या अधिक घटनाओं मैच 'और' apostrophe (या उद्धरण चिह्न) जो मूल्य चिह्न इस्तेमाल की आपूर्ति करती थी. 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. इन विशेष अक्षर नहीं शाब्दिक व्याख्या जब Oracle में एसक्यूएल क्वेरी निर्माण होगा, और परिणाम में त्रुटि हुई हो तो लौट खासकर जब तरह खोजशब्द के साथ स्ट्रिंग खोज प्रदर्शन. 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 के बजाय उन्हें पूर्व निर्धारित की स्ट्रिंग मूल्य के एक भाग के रूप में शाब्दिक व्याख्या कर सकते हैं मतलब है, चरित्र से बचने को सौंपा जाना चाहिए.
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. Oracle Oracle में आरक्षित अक्षर के लिए विशेष बच अक्षर का काम सामान्य अक्षर है कि शाब्दिक व्याख्या, बच खोजशब्द का उपयोग कर रहा है बच सकता है की अनुमति देता है.
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 कहां 'की तरह% नाम \ _'% बच '\';
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.' का चयन करें 'यह है quote' शब्द के अनुरूप प्रदर्शन करेंगे. FROM temp_table; 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 : The page is machine translated and provided "as is" without warranty. महत्वपूर्ण: पृष्ठ की मशीन है और अनुवाद प्रदान "के रूप में वारंटी के बिना है." Machine translation may be difficult to understand. मशीन अनुवाद मुश्किल से समझ सकते हो. Please refer to कृपया उल्लेख करने original English article मूल अंग्रेजी लेख whenever possible. जब भी संभव है.
Related Articles संबंधित लेख
- Insert Text Literal and Concatenation in Oracle SQL डालें पाठ शाब्दिक और कड़ी Oracle में एसक्यूएल
- Using Character Map (charmap) to Type and Input Special Characters and Accents in Windows Vista चरित्र मानचित्र (प्रकार और इनपुट विशेष वर्ण और Windows Vista में एक्सेंट को charmap) का उपयोग करना
- Oracle EXP-00091 Error When Export Database Oracle EXP-00091 त्रुटि जब निर्यात डाटाबेस
- Check Oracle Version जांच Oracle संस्करणः
- Firefox 3.1 Beta Smart Location Bar Enhancement: Special Characters to Restrict Searching & Smart Keyword to Search from Specific Website Firefox 3.1 बीटा स्मार्ट स्थान बार संवर्धन: विशेष वर्ण के लिए खोज और स्मार्ट खोज को प्रतिबंधित खोजशब्द विशिष्ट वेबसाइट से
- Remove or Trim First or Last Few Characters in MySQL Database with SQL निकालें या छाँटो पहले या अंतिम एसक्यूएल के साथ MySQL डाटाबेस में कुछ वर्ण
- Change Oracle Database User Password बदलें Oracle डाटाबेस प्रयोक्ता पासवर्ड
- IMP-00016 Required Character Set Conversion Not Supported Error when Import to Oracle Database छोटा सा भूत-00016 आवश्यक कैरेक्टर सेट रूपांतरण नहीं समर्थित त्रुटि जब Oracle डाटाबेस के लिए आयात
- ORA-01502 Oracle Index in Unusable State ORA-01502 Oracle सूचकांक व्यर्थ राज्य में
- You Are Not Authorized to Execute SQL Queries in vBulletin Maintenance तुम नहीं vBulletin रखरखाव में चलाएँ एसक्यूएल प्रश्न के लिए अधिकृत हैं










































September 26th, 2008 00:28 26 सितम्बर 2008 00:28
Thank you very much – I'ma SQL Server gent with an Oracle source and I was going nuts! बहुत बहुत एक Oracle स्रोत के साथ - I'ma एसक्यूएल सर्वर सज्जन का शुक्र है और मैं पागल हो रहा था!
September 17th, 2008 20:44 17, 2008 20:44 सितम्बर
salut j'ai le mm pb ! salut j'ai le मिमी पंजाब! si je fait une recherche sur le '_' seul sa marche mais si v je chercher des mots avec le '_' सुर जेई संपन्न une सी सभ्य ले '_ सी seul सा Marche mais v जेई chercher des mots avec le' _ '
exmple: exmple:
SELECT * from Test WHERE nom LIKE '1%\_%test' ESCAPE '\'; का चयन करें टेस्ट कहां nom तरह से '1 *% \ _% 'परीक्षण से बचने' \ ';
sa me renvoie : सा मुझे renvoie:
1_test 1_test
10_test ?? 10_test?
or que normalement sa devait rendre que: या que normalement सा devait rendre que:
1_test ?? 1_test?
je comprend pas जेई comprend सहूलियत
July 13th, 2007 19:27 13 जुलाई 2007 19:27
[...] about Escape Characters. [...] एस्केप वर्ण के बारे में. Escape Characters Oracle Wildcards Wildcard Characters Escape Character How to Escape Characters in Oracle PL/SQL Queries बच वर्ण Oracle वाइल्डकार्ड वाइल्डकार्ड वर्ण एस्केप Character कैसे Oracle पी एल / SQL प्रश्न में वर्ण बचने के लिए