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…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索