Summary of the use of the like keyword in Oracle

Source: Internet
Author: User

Summary of the use of the like keyword in Oracle

Use like in Oracle for fuzzy search:

Assume that the table name is hs_test, and the field name is client_id.

1. query which has 03 in client_id:

Select client_id from hs_test where client_id like '% 100'

2. query client_id values starting with 03:

Select client_id from hs_test where client_id like '201312'

3. query the client_id ending with 03:

Select client_id from hs_test where client_id like '% 03'

4. query which client_id contains letters:

Select client_id from hs_test where client_id like '% [a-z] %'

5. query which client_id contains numbers:

Select client_id from hs_test where client_id like '% [0-9] %'

Others can be extended based on the above several forms, which will not be described here.

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.