snippetsqlMinor
Self-join example review in Books Online
Viewed 0 times
booksexamplejoinonlinereviewself
Problem
Here in this example it states that performs a self-join, but it joins
source link
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?source link
Solution
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
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.Context
StackExchange Database Administrators Q#230296, answer score: 7
Revisions (0)
No revisions yet.