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
  • 34,719
  • 24
  • 185
  • 251

2 Answers2

0

You should not use like keywords in quotes.

Change:

 columnname 'like %abc%' 

To:

columnname like '%abc%' 
Arvind Jaiswal
  • 432
  • 5
  • 13
0

Try this:

select a.*,b.* 
from table1 a,table2 b 
where (a.acolumnname LIKE '%abc%') OR
      (b.bcolumnname LIKE '%abc%') 
asd-tm
  • 2,617
  • 2
  • 21
  • 35