Oracle like Fuzzy query

Source: Internet
Author: User

In some queries, you may not be able to grasp the exact value of the query, such as Baidu search input key words can query out the relevant results, this query is called Fuzzy query.
The fuzzy query uses the LIKE keyword to retrieve the required rows of data through character matching. The wildcard characters "%" and "_" can be used for character matching operations:
%: represents 0 or more arbitrary characters. _: Represents an arbitrary character.

The syntax is: Like ' string ' [ESCAPE ' character ']. The "character" in the matched string, after escape, is used as the escape character.

Wild-Letter Expressions
The ' s% ' string that begins with S.
' _s% ' The second character when S of a string.
'%30\%% ' escape ' \ ' contains a string of "30%", "\" means an escape character, and "\%" represents a character "%" in a string.

Code Demo: Displays the name, salary, and salary of the employee whose name begins with J at the end of S.

<span style= "FONT-SIZE:18PX;" >SQL> SELECT ename,job,sal from EMP WHERE ename like ' j%s ';</span>

Oracle like Fuzzy query

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.