Professional Documents
Culture Documents
LAB2
LAB2
ORDER BY name
FROM account
SELECT name
SELECT name
WHERE c.name = d.customer_name AND d.account_number IN(SELECT number FROM account WHERE
branch_name = 'Perryridge')
Or
SELECT name
UNION
SELECT name
14) for OR, it does not return any result, but for UNION it does, OR does not return result because of
borrower table is empty, therefore when selecting name from borrower it returns empty results.
select depositor.customer_name
from depositor, borrower
where exists(
select depositor.account_number
from account
where depositor.account_number=account.number
and account.branch_name='perryridge'
)
and borrower.customer_name=depositor.customer_name