Home >Database >Mysql Tutorial >How to query statements starting with what characters in Mysql
mysql Query the statement starting with what character: 1. Use wildcard query, the code is [SELECT * FROM `article` where title like 'positive%';]; 2. Use the left function to query, the code is 【where left(title,1)】.
mysql query statement method starting with what character:
#1: Use wildcards:
SELECT * FROM `article` where title like '正%';
2: Use the left function:
SELECT * FROM `article` where left(title,1)='正';
3: Use the string interception function:
SELECT * FROM `article` where substring(title,1,1)='正';
More related free learning recommendations: mysql tutorial(Video)
The above is the detailed content of How to query statements starting with what characters in Mysql. For more information, please follow other related articles on the PHP Chinese website!