Reputation: 717
I have 2 tables column col1 of table1 has values abc, def, ghi
The value of the column col2 of the second table contains one of the above values.
Now I want the list of all rows of table2 which are the part of the value of col1
Upvotes: 0
Views: 324
Reputation: 5141
Please use below syntax to get your data,
select t2.* from table1 t1
inner join table2 t2
on (t1.col1 = t2.col2);
Also please tag appropriate tag as well as provide sample data to make every one understand and get proper solution
Upvotes: 2