Alex I Alex I - 5 months ago 8
SQL Question

How do I find column which columns have all numbers in an array

I am using PHP

I have an SQL Table that looks like so:
SQL Table:

I am trying to retrieve all rows which contain "9" in the "FAMILY" Column
How would I do so?
Note: The numbers are separated by hyphens "-"

Answer

Please try this query:

select * from table_name where concat('-',FAMILY,'-') like '%-9-%';
Comments