how to use like operator in join operation? because i want to join the two table and search the any word of value in table.
my query is
select a.*,b.* from table1 a,table2 b
where columnname 'like %abc%'
how to use like operator in join operation? because i want to join the two table and search the any word of value in table.
my query is
select a.*,b.* from table1 a,table2 b
where columnname 'like %abc%'
You should not use like
keywords in quotes.
Change:
columnname 'like %abc%'
To:
columnname like '%abc%'
Try this:
select a.*,b.*
from table1 a,table2 b
where (a.acolumnname LIKE '%abc%') OR
(b.bcolumnname LIKE '%abc%')