Usually, I use
SELECT * FROM tableName WHERE fieldName LIKE '%string%'
to find every row in tableName where the value of fieldName contains the string 'string'. How can I find every row in tableName where the value of fieldName is contained in the string 'string'?
For example, in the following table
names
FirstName | LastName
Bob | Dylan
Bob | Marley
I would like to use the string "Bob Marley" in order to find [Bob | Marley] and [Bob | Dylan], so I would say: Find all rows in names where the value of FirstName is contained in "Bob Marley"
I thought of this:
SELECT * FROM tableName WHERE 'string' LIKE %fieldName%
but it doesn't work.