Finding data from a table that is linked with another table using foreign keys

5 pts.
Tags:
Database
Oracle
SQL
I want to see all the customer names and their city who have an account in a specified bank. Problem is my customers are listed in one table and accounts are listed in another. But I do have another table called depositor where it only store account name and customer name. How can I see customers who have an account?


Software/Hardware used:
oracle,sql
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

No answer yet.  See discussion below.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • carlosdl
    It would be easier if you post the structure of your tables (list of columns of each table), instead of describing it with words.

    You should have a way to relate an account to a customer (a name is not a reliable method).  If you don't, then you have a design problem.

    Let us know the tables's structures, so we can try to help.
    84,630 pointsBadges:
    report
  • carlosdl
    I removed unnikrishnan104's answer from the Wiki, as VLOOKUP is not a function available in Oracle's SQL.
    84,630 pointsBadges:
    report
  • ToddN2000
    Post your code and we will take a look if you are still having issues.
    131,380 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: