tags:

views:

79

answers:

3
Q: 

Cross Join

In SQL can anyone give me some good examples of when you would use a cross join?

Duplicate Questions

A: 

Please look here

Ali Kazmi
A: 

Option 1: it can be used for easlity generation a big amount of data (for example for testing purposes).

Koistya Navin
A: 

I've used exactly one in my career in anger, as a technique for rapidly matching many-to-many relationships. The problem was being able to search out relationship between two classes of groups from either side.

There's any number of ways to solve that programatically but since we had billions of possibilities it turned out matching arrays of simple string keys with a cross join was orders of magnitude faster than anything else.

annakata