Inner Join
Inner Join returns the records by matching the values of both tables given with join.
Syntax :-
SELECT table1.column_name, table.2column_name
FROM table_name1 INNER JOIN table_name2
ON table1.common_field = table1.common_field;
Example :figure in below, we have, two tables customers and orders.
Now, let see join these two tables using the INNER JOIN as follows :
Query :
Output :
SELECT ID, Name, Address
FROM customers INNER JOIN orders
ON customers.ID = orders.customers_Id;
0 Comments