+ 1
There are factors which can be used to determine which is the left or right table once i want to join them in sql ??
Using left join or right join in sql.
3 odpowiedzi
+ 3
See these visual representations of LEFT and RIGHT JOINs.
https://www.codeproject.com/articles/33052/visual-representation-of-sql-joins
This is the best resource I have found to quickly determine how to write a complicated JOIN. I refer to it often.
+ 3
Observe that there is symmetry in Venn diagrams.
T1 LEFT JOIN T2
is exactly the same as
T2 RIGHT JOIN T1
Both of these mean that all lines of T1 are kept, and only the matching lines from T2 are combined to it.
For this reason I hardly ever use right join, because for me it makes a clearer mental path to add extra information from left to right.
+ 1
Ndungu yangu ErickMM no yako ndungu yangu