The INNER Join condition returns values as per below rule:
All the matching data values from Table A and Table B based on a common column between both the tables
INNER JOIN : keyword used for INNER JOIN, in order to fetch all the matching records from both the table.
Table_name1/Table_name2 : The name of the first/second table from where you want to fetch the data
Column1Name : The name of the columns of the table based on which you want to join.
Let us consider a demo database with two tables Persons & Salary .Following is the structure of both the tables:
Figure 32.1. SELECT * FROM PERSONS;
Figure 32.2. SELECT * FROM SALARY;
The following SQL statement selects all records from Salary table with EmployeeId information:
Figure 32.3 EXAMPLE OF INNER JOIN
Want More SQL Deep Dives