sql - 从 SQL Server 中的多个表中进行选择
问题描述
SQL Server 中的这种语法是什么意思?
select top 10 *
from
table1 as t1,
table2 as t2
这是工会还是加入?它是否将两个表组合在一起?不确定这个语法到底是什么意思?有人有这方面的在线资源吗?
解决方案
,
是 . 的古老语法cross join
。这更通俗地写成:
select top 10 *
from table1 as t1 cross join
table2 as t2;
也就是说,使用top
withoutorder by
是可疑的。
推荐阅读
- constructor - 构造函数 NotImplementedException?
- tinymce - 使用 inyMCE 5 使用 max_width 时遇到问题
- haskell - 在 Haskell 中计算“Just int”模块
- javascript - 如何在反应中删除 \n \t
- r - 当 x,y,group 列相同时,相当于 ggplot2 中的简单图和线,但线的数据不同,每组一条线(无 lm,回归)
- css - 无法在 PDF 中设置背景图像(飞碟)
- python - 更改 Posixpath 以适应 windows
- java - 在 Weblogic 上部署 OpenID Azure AD java web 应用时出现 NoClassDefFoundError
- sql - 具有不同列数的联合 ALL
- python - 无法使用 spyder(任何版本)导入 tensorflow 2.x:Tensorflow_core.estimator 问题