I have a table with two columns, the first column is of type VARCHAR and the second of type SET.
column1(VARCHAR) column2(SET)
person1 group1
person2 group2
person3 group1, group2
I want to retrieve everyone in "group1"...
Which returns only person1 and not person1 and person3 as I want.
I have searched through the manual and found several ways to search for data matching several criteria (ANY, IN, SOME, ALL) but not "the other way around".
I guess what I'm really asking is how do I search within a column of type SET?
column1(VARCHAR) column2(SET)
person1 group1
person2 group2
person3 group1, group2
I want to retrieve everyone in "group1"...
Code:
SELECT * FROM mytable WHERE column2 = 'group1';
Which returns only person1 and not person1 and person3 as I want.
I have searched through the manual and found several ways to search for data matching several criteria (ANY, IN, SOME, ALL) but not "the other way around".
I guess what I'm really asking is how do I search within a column of type SET?