• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question INNER JOIN THREE TABLES (SSMS 19)

Ardit

New Pleskian
I have these tables as below :

1). Employees table with Column SuperVisorID
2). Departments table with Column name of Departments (....)

3). Supervisor table with Columns : Name, LastName, SupervisorId .

I have edited in TOP 200 ROWS

How to execute correct way on QUERY SQL SERVER 2019 AT PROGRAM AS BELOW TABLES ??
 
SELECT *
FROM table1 AS a
INNER JOIN table2 AS b ON b.id = a.ref_id
INNER JOIN table3 AS c ON c.id = b.ref_id

or

SELECT *
FROM table1 AS a
INNER JOIN table2 AS b ON b.id = a.ref_id
INNER JOIN table3 AS c ON c.id = a.ref_id

etc. where id is a field in the one table that carries the same value that links to the reference field in the other table as ref_id.
 
Back
Top