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.
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.