I have two tables a and b.
Table a has a field named gr which can have multiple values concatained with string.
Table b holds it seperately in fields lg.
How do i run the below query to check whether b.lg is in a.gr?
SELECT lg FROM `a`,`b` WHERE a.`id` =22 AND (a.gr LIKE '%'+b.lg+'%')
You need to use CONCAT function try: