Skip to content
Advertisement

Show the names of customers that have accounts SQL Query Oracle 10G

Q1 Show the names of customers that have accounts

Q2 Show the customer names with the names of the employees they deal with**

Advertisement

Answer

Q1 is a simple lookup of the cust_id in junction table has:

This phrases as: select the customers that have at least one entry in the has table.

When it comes to Q2: your data structures show no sign of employees (all we have is customers and accounts), so this cannot be answered based on the information that you provided. You might want to ask a new question for this, providing sample data for the involved tables, along with desired results and you current attempt at solving the problem.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement