ใช้ LIKE ค้นหาแบบประมาณ (Pattern matching) ไม่สนใจเครื่องหมายวรรคตอน
mysql> CREATE TABLE DemoTable (
-> Comments VARCHAR(20)
-> );
Query OK, 0 rows affected (1.10 sec)
mysql> INSERT INTO DemoTable VALUES('Good,Morning');
Query OK, 1 row affected (0.15 sec)
mysql> INSERT INTO DemoTable VALUES('Nice');
Query OK, 1 row affected (0.51 sec)
mysql> INSERT INTO DemoTable VALUES('good,bye!');
Query OK, 1 row affected (0.11 sec)
mysql> SELECT * FROM DemoTable;
+--------------+ | Comments | +--------------+ | Good,Morning | | Nice | | good,bye! | +--------------+ 3 rows in set (0.00 sec)
ค้นหาที่มีคำ good (ไม่สนใจเคสและเครื่องหมาย):
mysql> SELECT * FROM DemoTable WHERE Comments LIKE '%good%';
+--------------+ | Comments | +--------------+ | Good,Morning | | good,bye! | +--------------+ 2 rows in set (0.00 sec)
ข้อดี: LIKE ไม่สนใจเครื่องหมายวรรคตอน ค้นหา substring ได้ ทำงานแบบ Case-insensitive โดยค่าเริ่มต้น (Collation ci)