I was studying Theta join. In join condition, we can use 'on' or 'using' for specifying common columns in two or more tables. Now how would I know If I am to use 'on' or 'using' ?
Example
Find customer names and their loan amounts (loan and borrower are two relations)
Table layout:
loan (loan_number, branch_name, amount)!
borrower (customer_name, loan_number)!
So what is the difference between this:
select b.customer_name, l.amount
from borrower b join loan l
on b.loan_number = l.loan_number"
and this:
select b.customer_name, l.amount
from borrower b join loan l
using (loan_number)