Looking to Build/Redesign a Website or Blog ?

To speak to Rakshit, call +91 968 704 2303

Difference between IN and FIND_IN_SET

Hello Friends,

You may be confused with IN() and FIND_IN_SET() MYSQL functions. There are specific case/situation for both functions where to use which Mysql function. Look at below explanation about IN() and FIND_IN_SET().

IN() : This function is used when you have a list of possible values and a single value in your database.
Example: WHERE memberid IN (1,2,3)

FIND_IN_SET() : This function is used where you have comma separated list of values stored in database and want to see if a certain value exists in that comma seperated list.
Example: WHERE FIND_IN_SET( ‘Rakshit’, namelist )

Let me know if you find any problem.

Thank You!

Share:

No Comments Yet.

Leave a Reply

Your email address will not be published.