1. The exists construct returns true if the argument subquery is nonempty.
2. Find all customers who have a loan and an account at the bank.
select cname
from borrower
where exists (select *
from depositor
where depositor.cname = borrower.cname)
1. The exists construct returns true if the argument subquery is nonempty.
2. Find all customers who have a loan and an account at the bank.
select cname
from borrower
where exists (select *
from depositor
where depositor.cname = borrower.cname)