Mysql must know will read notes the eighth chapter uses wildcard characters for filtering _mysql

Source: Internet
Author: User

Introduction to MySQL

MySQL is an open source relational database management system (RDBMS), the MySQL database system uses the most commonly used database management language-Structured Query Language (SQL) for database management.

Tips for using wildcard characters:

1. Do not overdo using wildcard characters. If other operators can achieve the same effect as wildcard characters, other operators should be used first.

2. When you do need to use wildcard characters, do not use them at the beginning of the search pattern unless absolutely necessary. Place the wildcard character at the beginning of the search pattern, which is the slowest search.

3. Careful attention to the wildcard position, if misplaced, may not return the desired results

Precautions:

Case Sensitive: depending on how MySQL is configured, the search can be case-sensitive. The ' jet% ' and jetpack 1000 will not match if case-sensitive.

Note trailing spaces: trailing spaces may interfere with wildcard matching

Note NULL Although it seems that% can match anything, with one exception, that is null. Even where prod_name like '% ' cannot match a row with a value of NULL as the product name.

The wildcard character that is used has a% match of 0 or more characters. And _ can only match one character.

The above content is a small series to introduce the MySQL will know will read the eighth chapter of the use of wildcard filter related knowledge, hope to help everyone!

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.