Skip to content

LIKE

SELECT * FROM Customers
WHERE CustomerName LIKE "%or%";
+----+--------------+-------------+
| Id | CustomerName | ContactName |
+----+--------------+-------------+
| 3 | Antonio Moreno| Antonio Moreno |
| 7 | Around the Horn| Thomas Hardy |
+----+--------------+-------------+

In this example, the LIKE clause is used on the Customers table to select all records where CustomerName contains the text “or”. Two rows in the result set contain “or” in the CustomerName.