I have a column that has comma separated data:
1,2,3
3,2,1
4,5,6
5,5,5
I\'m trying to run a search that would query each value of the CSV s
Usually substring_index does what you want:
mysql> select substring_index("foo@gmail.com","@",-1);
+-----------------------------------------+
| substring_index("foo@gmail.com","@",-1) |
+-----------------------------------------+
| gmail.com |
+-----------------------------------------+
1 row in set (0.00 sec)