I have two tables:
tb1:
Name Email Location
-----------------------------------
user1 email1 address1
user2 email2 address2
user3 email3 address3
-----------------------------------
tb2:
Group Email
-----------------------------------
group1 email1,email2
group2 email4
group3 email5,email6
-----------------------------------
Now I want to join these two tables, to display the usernames who are listed in table 2, with keyword "email", so the result of above example will print:
----------------
user1, user2
----------------
I tried to use statement like:
SELECT a.name FROM tb1 a, tb2 b WHERE a.email IN b.email
but it doesn't work, anyone can advise me? thanks in advance.