I don't get it. I've tried:
SELECT
table1.name, CONCAT( country, '.', id ) AS table1.code,
table2.name
FROM tabel1
LEFT OUTER JOIN
table2 ON ( table1.code = table2.code )
I need to combine country
and id
to country.id
because table2.code
has this schema.
Thanks in advance.
If I understand you correct you might need something like this
SELECT t1.name t1_name,
t2.name t2_name
FROM table1 t1 LEFT JOIN
table2 t2 ON CONCAT(t1.country, '.', t1.id ) = t2.code
SQLFiddle example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With