SQL Basic
SQL Advanced
SQL Functions
| SQL Inner Join |
SQL INNER JOIN KeywordThe INNER JOIN keyword return rows when there is at least one match in both tables. SQL INNER JOIN Syntax
PS: INNER JOIN is the same as JOIN. SQL INNER JOIN ExampleThe "Persons" table:
The "Orders" table:
Now we want to list all the persons with any orders. 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 "Orders", those rows will NOT be listed. |
SQL Inner Join