0

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%' 
Cœur
  • 37,241
  • 25
  • 195
  • 267

2 Answers2

0

You should not use like keywords in quotes.

Change:

 columnname 'like %abc%' 

To:

columnname like '%abc%' 
Arvind Jaiswal
  • 442
  • 5
  • 14
0

Try this:

select a.*,b.* 
from table1 a,table2 b 
where (a.acolumnname LIKE '%abc%') OR
      (b.bcolumnname LIKE '%abc%') 
asd-tm
  • 3,381
  • 2
  • 24
  • 41