+ 3
what query for join 3 tables or more
5 Respostas
+ 2
select a.col,o.m.,o.n from a join (select b.col as m,c.col as n from a join b on b.id as id =a.id) as o
on a.id=o.id;
+ 2
Clarify your question. Do you want all info from 3 or more tables or just specific info?
You can use SELECT table1.*, table2.*, table3.* FROM table1, table2, table;
Or
SELECT table1.*, table2.*, table3.*
FROM table1
JOIN table2
ON (appropriate check here)
JOIN table3
ON (appropriate check here);
+ 1
select * from table1,tablr2,table3;
0
thanks all
- 1
select e.first_name,d.department_name,l.city
from employees e join departments d
on e.department_id = d.department_id
join locations l
on d.location_id = l.location_id;
or
select e.first_name,d.department_name,l.city
from employees e join departments d
using (department_id)
join locations l
using (location_id);