两种 SQL 连接表示法之间有什么区别?
- 作者: 联合国灭猫灭狗小组长
- 来源: 51数据库
- 2022-12-06
问题描述
SQL 1: select * from t1 join t2 on t1.f1 = t2.f2
SQL 2: select * from t1,t2 where t1.f1 = t2.f2
它们返回的结果是一样的.它们之间有什么区别吗?例如,在 DBMS 中如何运行它们,或者在查询计划中?
The results that they return are same. Are there any differences between them? For example, in how the DBMS runs them, or in the query plan?
推荐答案
这两个查询在操作上没有区别.
There is no operational difference between the two queries.
然而,显式连接符号是更好的学习和使用风格;将另一个留给(尚未更改的)遗留代码.
However, the explicit join notation is the better style to learn and use; leave the other for (as yet unchanged) legacy code.
推荐阅读
热点文章
检查拆分键盘
0
带有“上一个"的工具栏和“下一个"用于键盘输入AccessoryView
0
Activity 启动时显示软键盘
0
UIWebView 键盘 - 摆脱“上一个/下一个/完成"酒吧
0
在 iOS7 中边缘滑动时,使键盘与 UIView 同步动画
0
我的 iOS 应用程序中的键盘在 iPhone 6 上太高了.如何在 XCode 中调整键盘的分辨率?
0
android:inputType="textEmailAddress";- '@' 键和 '.com' 键?
0
禁用 iPhone 中键盘的方向
0
Android 2.3 模拟器上的印地语键盘问题
0
keyDown 没有被调用
0
