How to join columns of 3 different Tables?

How can I join the columns of 3 different tables in SQL ?

Select column 1,column 2,column 3…
from table 1 t1,
Table2 t2,
Table3 t3
Where t1.primarykey = t2.primarykey
And t1.primarykey= t3.primary key and condition of date range if applicable

you can do with multiple join also.
please go through this link and you will get to know-https://www.w3schools.com/sql/sql_join_inner.asp

1 Like

ou can join as many tables as you want, and they can be joined as a mix of INNER and OUTER joins. Just keep chaining the JOINs together with ON clauses that match .

Example 01

Select * from

TableA A

join TableB B on A.columna=B.columnb

join TableC C on B.columnd=C.columnc;

Example02

Select * from employees e

Join department d on e.department_id=d.department_id

Join location l on d.location_id=l.location_id;