nasty join Archives - Anuj Varma, Hands-On Technology Architect, Clean Air Activist https://www.anujvarma.com/tag/nasty-join/ Production Grade Technical Solutions | Data Encryption and Public Cloud Expert Mon, 02 Jun 2014 02:57:51 +0000 en-US hourly 1 https://wordpress.org/?v=7.0.2 https://www.anujvarma.com/wp-content/uploads/anujtech.png nasty join Archives - Anuj Varma, Hands-On Technology Architect, Clean Air Activist https://www.anujvarma.com/tag/nasty-join/ 32 32 Nasty Joins, Cartesian Joins https://www.anujvarma.com/nasty-joins-cartesian-joins/ https://www.anujvarma.com/nasty-joins-cartesian-joins/#respond Mon, 02 Jun 2014 02:57:51 +0000 http://www.anujvarma.com/?p=2564 A Cartesian join is an (incorrect) join between two tables. Incorrect because the tables have not been joined in any relational format. Select street_address from authors a, location b where […]

The post Nasty Joins, Cartesian Joins appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

]]>
A Cartesian join is an (incorrect) join between two tables. Incorrect because the tables have not been joined in any relational format.

Select street_address from authors a, location b where  a.last_name like ‘%varma%’

Since the tables have not been paired using a common relational column,  

SQL Server will multiply all the rows of table A with table B. This is called a Cartesian Join.

Other Bad Joins

Hash Joins, Merge Joins, Nested Loop Joins.

The post Nasty Joins, Cartesian Joins appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

]]>
https://www.anujvarma.com/nasty-joins-cartesian-joins/feed/ 0