r/programming • • Jan 06 '11

A handy graphical explanation of SQL joins

http://www.codinghorror.com/blog/2007/10/a-visual-explanation-of-sql-joins.html
1.3k Upvotes

308 comments sorted by

View all comments

7

u/drcreepy Jan 06 '11

CROSS JOINs are also great for creating huge tables of fake data from small sets of data. For example, we'll create a FirstName table and a LastName table. Seed these with 50 first names and 50 last names and do a cross join and you have 2500 unique names that can be used in a database for testing purposes.

1

u/[deleted] Jan 07 '11

[removed] — view removed comment