您当前的位置: 首页 >  sql

[MSSQL]cross join与cross apply的区别与应用

发布时间:2017-04-25 13:10:40 ,浏览量:0

What is Cross Join in SQL? The SQL CROSS JOIN produces a result set which is the number of rows in the first table multiplied by the number of rows in the second table if no WHERE clause is used along with CROSS JOIN. This kind of result is called as Cartesian Product.

If WHERE clause is used with CROSS JOIN, it functions like an INNER JOIN.

An alternative way of achieving the same result is to use column names separated by commas after SELECT and mentioning the table names involved, after a FROM clause.

Syntax SELECT * FROM table1 CROSS JOIN table2;

Pictorial Presentation of Cross Join syntax

关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    107766博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0434s