I have a database table with a VARCHAR based CSV field called sizes:
id | sizes
----------
1 | '1,2,4,5'
2 | '3,4,5,6,8'
3 | '3,5,6,1'
I'd like to select the set of sizes referenced by any row in the table:
sizes
-----
1
2
3
4
5
6
8
Is this possible?
N.B. I'm aware of the potential problems of CSV fields.. I'm looking at one now. I just want to know if this can be done. I'm also aware of how to normalise this data.