+ 2
Select rows with specific text in their column
i want to select rows which have a specific text in one of the row's column. for example in table below: id. name. achieves. ____________________ 0. Alex. "a1,a2,a3" 1. Pitter. "a2" 2. John. "a1,a3" 3. Ronny. "a2,a3" ... ... ... **achieves column accept Text** how to select rows which their achieves column contain for example a1 and a2 achievements. also the method should be fast as enough to do this in a very short time tnx for answering
1 Answer
+ 7
There must be some more efficient ways, but right now this one has come in my mind:
SELECT * FROM table_name where achieves LIKE '%a1%' OR achieves LIKE '%a2%';