Steve Rogers2,343 Points
The EMPLOYEES table has 267 rows and the JOBS table has 28 rows. How many ROWS does the following query return?
SELECT * FROM EMPLOYEES JOIN JOBS ON EMPLOYEES.JOB_ID = JOBS.ID;
Why does this not return 267 rows? I'm selecting everything from Employees. I'm joining the Jobs table, but I still have 267 rows in the Employees table.
Steven Parker177,671 Points
The word "JOIN" by itself is short for "INNER JOIN". So it will return rows where both tables have a JOB_ID (or ID) in common.
Since we don't have any idea what the table contents are, the output could have no rows at all (if there are no ID's in common) or any number up to the total number of employees (if they all have a JOB_ID found in the JOBS table).