How can I search data from MySQL table based on similar sound values?

MySQLMySQLi Database

With the help of SOUNDS LIKE operator, MySQL search the similar sound values from the table.

Syntax

Expression1 SOUNDS LIKE Expression2

Here, both Expression1 and Expression2 will be compared based on their English pronunciation of sound.

Example

Following is an example from ‘student’ table which will match the two expressions based on the pronunciation of sound

mysql> Select Id, Name, Address, Subject from student where name sounds like 'hrst';
+------+---------+---------+----------+
| Id   | Name    | Address | Subject  |
+------+---------+---------+----------+
| 15   | Harshit | Delhi   | Commerce |
+------+---------+---------+----------+
1 row in set (0.00 sec)
raja
Published on 20-Feb-2018 16:15:57
Advertisements