Here in this example it states that performs a self-join, but it joins Sales.SalesPerson
to Sales.SalesTerritory
. I knew that self join means joining the same table to itself but here aren't Sales.SalesPerson
and Sales.SalesTerritory
different tables? So is this considered self join though the tables are different? or is there a mistake?
SQL Server – Self-Join Example Review
self-joinsql servert-sql
Related Question
- Outer Self Join Filters vs Subqueries in SQL Server
- SQL Server 2014 – How to Select Only Supersets
- SQL Server 2014 – Optimize Self-Join on Primary Key
- Postgresql – self-joins in recursive CTE: `recursive reference must not appear more than once`
- SQL Server Functions – How to Perform a Function on a Returned Table Subset
- PostgreSQL – Joining Multiple Subqueries
- Mysql – Inner join on output of a subquery
- Oracle Self Join – Handling Non-Existent Joining Conditions
Best Answer
Looks like you are right in all observations and it is a mistake.
They are two separate tables (not views) and a self-join means a table joined to itself (and even a view or derived table or CTE joined to itself). You might even consider a join between a table and a view derived from that table to be a self-join but it is not the case here either.
I suggest you submit a bug report.
Link: list of
AdventureWorks
tables.