theta连接中'on'和'using'之间的区别

时间:2014-10-12 09:40:21

标签: sql

我正在研究Theta加入。在加入条件下,我们可以使用' on'或者'使用'用于在两个或多个表中指定公共列。现在我怎么知道如果我要使用''或者'使用' ?

实施例

  

查找客户名称及其贷款金额(贷款和借款人是两种关系)

表格布局:

loan (loan_number, branch_name, amount)!
borrower (customer_name, loan_number)!

那么这有什么区别:

select b.customer_name, l.amount 
from borrower b join loan l 
on b.loan_number = l.loan_number"

和此:

select b.customer_name, l.amount 
from borrower b join loan l 
using (loan_number)

0 个答案:

没有答案
相关问题