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


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)

Sai Subramanyam
Sai Subramanyam

Passionate, Curious and Enthusiastic.

Updated on: 30-Jul-2019

78 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements