Home > database >  Mysql question: how to query multiple comma-separated values for at least one contained in after a f
Mysql question: how to query multiple comma-separated values for at least one contained in after a f

Time:02-20

Variables: str1

Table: table1
Id column1
1 1,5,9,11,14,46
2 15,48,122
3, 11,14,42,125
4 12
5 June 18
6 2,5,8,36,58
7 1,11,15,73
8 4,5,8,12

When srt1=1,4,12,
Results:
Id column1
1 1,5,9,11,14,46
4 12
7 1,11,15,73
8 4,5,8,12

Column1 to comma segmentation, segmentation the value contained in any one or more than one str1 comma-separated values, is eligible,

How do I write a SQL statement?
Thank you very much!
  • Related