CROSS JOIN vs INNER JOIN in SQL

前端 未结 12 927
醉酒成梦
醉酒成梦 2020-11-22 03:16

What is the difference between CROSS JOIN and INNER JOIN?

CROSS JOIN:

SELECT 
    Movies.CustomerID, Movie         


        
12条回答
  •  情深已故
    2020-11-22 03:38

    Please remember, if a WHERE clause is added, the cross join behaves as an inner join. For example, the following Transact-SQL queries produce the same result set. Please refer to http://technet.microsoft.com/en-us/library/ms190690(v=sql.105).aspx

提交回复
热议问题