Correct use of Oracle ESCAPE characters and ESCAPE keywords

Source: Internet
Author: User

The following articles mainly introduce the actual operations of the Oracle ESCAPE character and the actual usage of the escape keyword in Oracle Database. We all know that the ESCAPE keyword is often used for some special characters, such as wildcards: '%', '_' escape them as original

The definition of escape characters is usually '\', but other symbols can also be used.

Instance:

 
 
  1. SQL> select * from t11 where name like '%_%';  
  2. NAME  
  3. aa_a  
  4. aaa  
  5. SQL> select * from t11 where name like '%\_%' escape '\';  
  6. NAME  
  7. aa_a  

NOTE: If '/' is used as the search character, '/' must be used as the escape character, and the same is true for the forward slash.

 
 
  1. select * from wan_test where psid like '%//%' escape '/'  

The above content is the description of the Oracle ESCAPE character, hoping to help you in this regard.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.