Search code examples
mysqlsql-likecontains

mysql not returning records that contain substring


I have a database emails that has crewEmails which contain email addresses. I'm trying to get all addresses that contain "comcast" in the address. Here's the sql I'm using:

SELECT * FROM `emails` WHERE crewEmail like '%{"comcast"}%'

but this returns nothing. I absolutely have comcast email addresses in the database.


Solution

  • No need of brackets :

    SELECT * FROM `emails` WHERE crewEmail like '%comcast%'