How to query fields with mysql wildcards
Mysql wildcard query field method: 1. Use [%] to indicate that any character appears any number of times, the code is [WHERE title like '%Zhang San']; 2. Use [_ 】Indicates a single character, and the code is 【WHERE title like & # 39;__Zhang San & # 39;】. More related free learning recommendation: mysql tutorial (video) mysql wildcard query Field method: First of all, let’s understand two concepts, one is an operator and the other is a wildcard. The operator like is the operator in the SQL statement. Its function is to indicate that the search pattern behind the SQL statement uses wildcards instead of direct Equality matches for comparison. Note: If no wildcard is used when using the like operator, the effect is consistent with the equal sign. SELECT id,title FROM table WHERE title like 'Zhang San'; This kind of writing is only It can match the record of Zhang San, but not the record like Zhang San is a good person. Wildcard % (percent sign), _ (underscore) is a wildcard, % means that any character appears any number of times (can be 0 times), _ means a single character, the user is as follows: SELECT id,title FROM table WHERE…