SQL Inner Join - Inner Join in SQL
SQL INNER JOIN
- The INNER JOIN keyword retrieves records with matching values in both tables.
Syntax
SELECT column_name(s) FROM table1; INNER JOIN table2; ON table1.column_name = table2.column_name;
Database
- Here is a portion from the "Wikitechy" table:
![table -Wikitechy](https://wikitechy.com/cdn/tutorials/sql/table-wikitechy.jpg)
- Here is an excerpt from the " Student Detail " table:
![table-student-details](https://wikitechy.com/cdn/tutorials/sql/table-student-details.jpg)
Example
SELECT tbl_Wikitechy.Student_Id, tbl_Wikitechy.Student_Name, tbl_Student_Detail.Place FROM tbl_Wikitechy INNER JOIN tbl_Student_Detail ON tbl_Wikitechy.Student_Id = tbl_Student_Detail.Student_Id;
Output
![sql-inner-join](https://wikitechy.com/cdn/tutorials/sql/sql-inner-join.png)