"query with multiple values in a column" Code Answer


The best solution would be to normalize your schema. You should have a separate table with one row for each child, instead of a comma-delimited list. Then you can join with this table to find parent with a specific child. See @themite's answer for an example of this.

But if you can't do that for some reason, you can use FIND_IN_SET:

WHERE FIND_IN_SET('Alex', children)
By letrollpoilu on December 3 2022

Answers related to “query with multiple values in a column”

Only authorized users can answer the search term. Please sign in first, or register a free account.