Combining Results with UNION
  • Description: Use UNION to combine results from two similar tables. Retrieve all employees from the USA and Canada in a single result set.
  • Table Used: employees_usa, employees_canada
    • employees_usa Columns: employee_id, first_name, last_name, country
    • employees_canada Columns: employee_id, first_name, last_name, country
  • Expected Columns Returned: employee_id, first_name, last_name, country
  • Schema:
classDiagram direction BT class employees_canada { varchar(50) first_name varchar(50) last_name varchar(50) country int employee_id } class employees_usa { varchar(50) first_name varchar(50) last_name varchar(50) country int employee_id }

select * from employees