• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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