What is the difference between CROSS JOIN
and INNER JOIN
?
CROSS JOIN:
SELECT
Movies.CustomerID, Movie
While writing queries using inner joins the records will fetches from both tables if the condition satisfied on both tables, i.e. exact match of the common column in both tables.
While writing query using cross join the result is like cartesian product of the no of records in both tables. example if table1 contains 2 records and table2 contains 3 records then result of the query is 2*3 = 6 records.
So dont go for cross join until you need that.