The Syntax of the SQL INNER JOIN is given as follows:

SELECT column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name=table2.column_name;

                                                       OR

SELECT column_name(s)
FROM table1
JOIN table2
ON table1.column_name=table2.column_name                                           

                                                      OR

SELECT column_name(s)
FROM table1, table2
ON table1.column_name=table2.column_name;

 

As the INNER JOIN is known as JOIN any of the syntaxes can be used to JOIN the tables.

 

Example:

Let us take two tables:

1.Employee table

IdEmployee_NameEmpl_AgeMonthly package
1Sushil2218000
2Bhargav3245000
3Mohanthy2625000
4Nithin3852000

 

 

2.Payment Table

Payment_IDDateEmployee_IdAmount
15023-02-201612500
15130-06-201525000
15214-09-201646500

 


Now to JOIN the tables we write a statement

SELECT Employee_ID,Employee_Name,Emp_Age, Amount
FROM Employee
INNER JOIN Payment
WHERE Employee.ID=Payment.Employee_ID;

 

 

The result produced will be like this:

Employee_IDEmployee_NameEmp_AgeAmount
1Sushil222500
2Bhargav325000
4Nithin386500