Home > Database > Mysql Tutorial > body text

What is the use of the MySQL SOUNDS LIKE operator?

王林
Release: 2023-09-09 10:21:03
forward
1194 people have browsed it

MySQL SOUNDS LIKE 运算符有什么用?

As the name suggests, the MySQL SOUNDS LIKE operator will search a table for similar sound values. The syntax is "Expression1 SOUNDS LIKE Expression2" where Expression1 and Expression2 are compared based on the English pronunciation of their sounds.

Example

The following is an example from the "student_info" table that will match two expressions based on the pronunciation of a sound -

mysql> Select * from student_info where name sounds like 'grov';
+------+--------+---------+------------+
| id   | Name   | Address | Subject    |
+------+--------+---------+------------+
| 105  | Gaurav | Jaipur  | Literature |
+------+--------+---------+------------+
1 row in set (0.00 sec)

mysql> Select * from student_info where name sounds like 'rmn';
+------+-------+---------+-----------+
| id   | Name  | Address | Subject   |
+------+-------+---------+-----------+
| 125  | Raman | Shimla  | Computers |
+------+-------+---------+-----------+
1 row in set (0.00 sec)
Copy after login

The above is the detailed content of What is the use of the MySQL SOUNDS LIKE operator?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!