Tools of the Trade: Linux and SQL | Weekly challenge 4 Quiz |
You need to perform a SQL join. You want to return all the columns with records matching on the device_id column between the employees and machines tables. You also want to return all records from the employees table. Which of the following queries would you use?
- SELECT * FROM employees INNER JOIN machines ON employees.device_id = machines.device_id;
- SELECT * FROM employees LEFT JOIN machines ON employees.device_id = machines.device_id;
- SELECT * FROM employees RIGHT JOIN machines ON employees.device_id = machines.device_id;
- SELECT * FROM employees FULL OUTER JOIN machines ON employees.device_id = machines.device_id