Processing of special characters like query underline in Oracle

Source: Internet
Author: User

You can include the actual character "%" or "_" in the pattern using the exception clause, which determines the escape character. If the escape character appears in the pattern in the character "%" or "_", Oracle will interpret the pattern on this character instead of as a special pattern match character.

Search for patterns A_b employees in their name:

SELECT last_name from     employees    WHERElike'%a\_b%'ESCAPE' \';            



The disclaimer backslash (\) is recognized as an escape character. In this mode, the escape character is an underscore (_). This causes the underscore to be interpreted by Oracle, not as a special pattern-matching character.

Processing of special characters like query underline in Oracle

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.