本文介绍了SQL INNER JOIN脚本查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正在接管一位同事的脚本,但在理解该脚本时遇到了问题.该脚本有什么作用?


I am taking over a colleagues script and having problems understanding it. What does this script do?


from Finance.dbo.vtbl_orbt sal

inner join Finance.dbo.tbl_Period_Lookup ht on ht.Current_Period = @Current_Period

where sal.SGPERI between ht.P_Minus_30 and ht.Current_Period




通常,当我进行联接时,我会使用内部联接来联接另一个表而不是另一个数字.




Usually when I do a join, I would use an inner join to join on another table instead of another number.

from Finance.dbo.vtbl_orbt sal

inner join Finance.dbo.tbl_Period_Lookup ht on ht.Current_Period = sal.SGPERI

where sal.SGPERI between ht.P_Minus_30 and @Current_Period




这样做有什么区别吗?如果是这样,为什么人们会采用以前的方式呢?



谢谢您的帮助.




Is there any difference from doing it this way? if so why do people do it the previous way?



Thanks for any help on this.

推荐答案



这篇关于SQL INNER JOIN脚本查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 13:41