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!