• Page:
  • 1

Query to search value in Comma Separated String

OFFLINE

Query to search value in Comma Separated String

4 months, 2 weeks ago
Hello Team,

If you want to query to find particular value from a Comma Separated Field
 For e.g. 
If you want to search BANGLORE in NASHIK,BANGLORE,MUMBAI
then you can use MySQL function find_in_set()

You can use it as below.

SELECT * from table_name WHERE find_in_set('BANGLORE',city_field_name);


Note: Since it does not use indexing, query would run slow on large tables..


Thanks
Last Edit: 4 months, 2 weeks ago by Abhinav Jaiswal.
The following user(s) said Thank You: Vicky Jain, Deepesh Chang, Farhan Sahibole, Adarsh Surania, Rajat Pal
  • Page:
  • 1

Upcoming Events

Who's Online