Retrieve Comma separated Values in a Table column by Mysql Query

FIND_IN_SET is the function which return result in searching for specific values in a comma separated values in a table column ,

You don’t need to use large set of record and array to filter those records  , use the query below to get records which you needed,


SELECT * FROM Table_name WHERE FIND_IN_SET(‘value’, column_name)


Have a look on the table columns i have web_class_id in a commas separated values , i want to retrieve web_class_id with value 63 now i will use the query below

SELECT * FROM Table_name WHERE FIND_IN_SET(’63’, web_class_id)

I got the result below




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s