SQL commands: CROSS JOIN and UNION

Could someone please tell me what the difference between CROSS JOIN and UNION is? Both seem to be stacking one table on top of the other?

UNION returns the resulting set of two or more SELECT statement, while CROSS JOIN returns every combination of records from the left of the join against the right. Taken from this stackoverflow question.

2 Likes

Ah this makes perfect sense. Thank you!