MySQL - WHERE x IN ( column)
07:30 01 Mar 2018

I tried something out. Here is a simple example in SQL Fiddle: Example

There is a column someNumbers (comma-seperated numbers) and I tried to get all the rows where this column contains a specific number. Problem is, the result only contains rows where someNumbers starts with the specific number.

The query SELECT * FROM myTable where 2 in ( someNumbers ) only returns the row with id 2 and not the row with id 1.

Any suggestions? Thank you all.

mysql sql