i have three table like:
table 1:
|A|B|C|D|
table 2:
|A|E|F|G|
table 3:
|G|H|
what i need in result is:
|A|B|C|D|H|
initially i check only the first two table taking, from table1
all the rows and from table2
the column G
in that rows that satisfy the condition table1.A = table2.A
something like:
SELECT `table1`.*,`table2`.`G` FROM `table1` INNER JOIN `table2` WHERE `table1`.`A`=`table2`.`A`
My problem now is to take column H
from table3
using like key value G
that satisfy old condition. i hope my question is a little bit clear.. can someone help me? thanks!