Page 126 - SQL
P. 126
e.FName m.FName
John James
Michael James
Johnathon John
Finally, column names e.FName and m.FName are replaced by their alias column names, assigned
with the AS operator:
Employee Manager
John James
Michael James
Johnathon John
CROSS JOIN
Cross join does a Cartesian product of the two members, A Cartesian product means each row of
one table is combined with each row of the second table in the join. For example, if TABLEA has 20
rows and TABLEB has 20 rows, the result would be 20*20 = 400 output rows.
Using example database
SELECT d.Name, e.FName
FROM Departments d
CROSS JOIN Employees e;
Which returns:
d.Name e.FName
HR James
HR John
HR Michael
HR Johnathon
Sales James
Sales John
Sales Michael
Sales Johnathon
https://riptutorial.com/ 108

