Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
3. JOIN - revision
Foreign keys
Multicolumn foreign keys
Updates and deletes


Excellent. Both tables are already present in our database. We've put some data into them as well.

Do you remember how to retrieve data from multiple tables in SQL queries? That's right, we used JOINs. See the example:

FROM project 
JOIN employee
  ON project.manager_id =;

The above query will select all information from the table project and all the information from the table employee. The information from both tables will be joined together thanks to columns and project.manager_id.


Use JOIN to select name and manager_id (table project) together with the last name of its the manager (table employee).

Stuck? Here's a hint!


SELECT, project.manager_id, employee.last_name 
FROM project 
JOIN employee 
  ON project.manager_id =;