Previous Topic: Additional Search Criteria in a JoinNext Topic: Things to Remember about Joining Tables


Exercise 6-4

Now You Try It

Human Resources wants a list of managers in charge of projects. You need to create a list of those managers with their IDs, last and first names.

What tables will you join?

You'll join the EMPLOYEE and CONSULTANT tables.

What are the join columns?

EMP_ID in EMPLOYEE and MANAGER_ID in CONSULTANT are the join columns.

Do you need to qualify any column name?

Yes, both tables have MANAGER_ID columns.

What additional search criteria do you need?

You need to specify that you only want each manager listed once.

The result looks like this:

MANAGER_ID  EMP_LNAME             EMP_FNAME ----------  ---------             ---------       1003  Baldwin               James       2466  Bennett               Patricia 2 rows processed

If your results do not match what you see above, check Review Answers for Chapter 6 for the correct SQL syntax. Remember that result tables may be shortened in this guide.