How can I join three mysql tables which have one common column (id), For example, Select a, b from Table1, select c,d from table2, select e,f from table3, where id=x Thanks
SELECT t1.a, t1.b, t2.c, t2.d, t3.e, t3.f
FROM table1 t1
JOIN table2 t2 ON (t1.id = t2.id)
JOIN table3 t3 ON (t1.id = t3.id)
ORDER BY t1.id;
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