Joining Tables (INNER JOIN)
  • Description: Learn how to join data from two tables using INNER JOIN. Retrieve each employee’s name along with their department name.
  • Table Used: employees, departments
    • employees Columns: employee_id, first_name, last_name, department_id, salary
    • departments Columns: department_id, department_name
  • Expected Columns Returned: employee_id, first_name, last_name, department_name
  • Schema:
classDiagram direction BT class departments { varchar(50) department_name int department_id } class employees { varchar(50) first_name varchar(50) last_name int department_id decimal(10,2) salary int employee_id } employees --> departments : department_id

select * from employees