Retrieve rows where a value exists within a comma separated list
- by Klaaz
I like to reverse this query:
SELECT * FROM table WHERE status IN ( option,option1,option2 );
in a query like
SELECT * FROM table WHERE status contains ( 'option' );
Where field 'status' column contains (by example): 'option,option1'.
When I use
SELECT * FROM table WHERE status LIKE '%option%' );
It also selects the rows with a 'status'…