Eh, from a practical standpoint you only need to understand left join, inner join and rarely full outer join.
A self join isn't anything unique to itself... You're going one table with another, but they happen to be the same.
A cross join is slow, and really doesn't scale. The necessity of them implies a bad data architect.
Right joins confuse programmers when combined with left joins, and there's no situation you're forced to use one or the other, so always use left a it allows for the query to be read in a natural way.
The article suggest using join instead of spelling out inner join. Don't do that. It's in some flavors of SQL considered deprecated.
It also suggests putting the join criteria in the where clause. REALLY don't do this. This is ignoring how query optimizers work, which means it might run slower. Potentially a lot slower.
And lastly it suggests that you can combine your join criteria and where clause. This is bad because if you have multiple joins you might exclude results that would otherwise be valid.
2
u/[deleted] Jan 30 '16
Eh, from a practical standpoint you only need to understand
left join,inner joinand rarelyfull outer join.A self join isn't anything unique to itself... You're going one table with another, but they happen to be the same.
A cross join is slow, and really doesn't scale. The necessity of them implies a bad data architect.
Right joins confuse programmers when combined with left joins, and there's no situation you're forced to use one or the other, so always use left a it allows for the query to be read in a natural way.
The article suggest using
joininstead of spelling outinner join. Don't do that. It's in some flavors of SQL considered deprecated.It also suggests putting the join criteria in the where clause. REALLY don't do this. This is ignoring how query optimizers work, which means it might run slower. Potentially a lot slower.
And lastly it suggests that you can combine your join criteria and where clause. This is bad because if you have multiple joins you might exclude results that would otherwise be valid.