Pramod
Pramod

Reputation: 1041

Checking a imploded string against comma separated column in mysql

I need to check like where (1,2,3) match (column2) here column2 itself a comma seperated string, if any any value in column2 we need to get that row. Thanks in advance.

Upvotes: 0

Views: 130

Answers (1)

eggyal
eggyal

Reputation: 125865

Use MySQL's IN operator:

WHERE column2 IN (1,2,3)

Upvotes: 1

Related Questions