Tuesday, 6 October 2015

Difference between IN and FIND_IN_SET - MYSQL

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( ‘Bhavin’, namelist )

1 comment:

  1. This really a particular Heroku Vs Aws instructive put up and is particularly valuable not to mention competent. subsequently, I need towards regards for ones projects you have made written this text. This is very instructive piece of writing on the subject of perusing not to mention grasping terminology. I really like your website put up substantially. Regards for the purpose of showing not to mention waiting a different put up.

    ReplyDelete