The INNER JOIN keyword return rows when there is at least one match in both tables.
PS: INNER JOIN is the same as JOIN.
The "Persons" table:
The "Purchases" table:
Now we want to list all the persons with any Purchases.
We use the following SELECT statement:
The result-set will look like this:
The INNER JOIN keyword return rows when there is at least one match in both tables. If there are rows in "Persons" that do not have matches in "Purchases", those rows will NOT be listed.
Your Query was successfully sent!