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.
这篇关于两种 SQL 连接表示法之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
将每个子标记转换为具有多个分隔符的单列-SQLConverting Every Child Tags in to a Single Column with multiple Delimiters -SQL Server (3)(将每个子标记转换为具有多个分隔符的单列-SQ
如何从多个表创建视图?How can I create a view from more than one table?(如何从多个表创建视图?)
根据前一行内的计算值创建计算值Create calculated value based on calculated value inside previous row(根据前一行内的计算值创建计算值)
如何将表格的前两列堆叠成一列,但也仅将第三How do I stack the first two columns of a table into a single column, but also pair third column with the first column only?(如何将表格的前两列堆
递归 t-sql 查询Recursive t-sql query(递归 t-sql 查询)
将月份名称转换为日期/月份编号(问题和答案的组Convert Month Name to Date / Month Number (Combinations of Questions amp; Answers)(将月份名称转换为日期/月份编号(问题和答案的组合