Tuesday 15 April 2014

sql - Does order matter in theta join -



sql - Does order matter in theta join -

i got 3 relations

customer (customer_name, city) loan (loan_number, branch_name, amount) borrower (customer_name, loan_number)

find client name, city , loan amounts.

first query:

select c.customer_name, c.city, l.amount borrower b bring together loan l using (loan_number) bring together client c using (customer_name)

second query:

select c.customer_name, c.city, l.amount client c bring together borrower b using (customer_name) bring together loan l using (loan_number)

will 2 queries produce same result?

in inner joins (as opposed outer joins), order of tables not matter.

sql join

No comments:

Post a Comment