table1
id | name | can | some
---- +------+------+-----
1 |A | can1 | f
2 |B | can0 | g
3 |C | can1 | h
4 |d | can2 | i
table2
id | name | description
----+------+--------------
1 |can0 | some text
2 |can1 | another text
3 |can2 | text to
I have two tables. I want to get row with id=3 from table1and get description of can1 from table2.
I tried this
SELECT t1.* , t2.description
from table1 as t1 , table2 as t2
WHERE t1.can = t2.name
but this is not work.please help thanks