SQL INNER JOIN

SQL INNER JOIN

What is Inner Join in SQL?

INNER JOIN is the same as JOIN; the keyword INNER is optional.

A query can contain zero, one, or multiple JOIN operations.

A SQL JOIN combines records from two tables.

A JOIN locates related column values in the two tables.

The INNER JOIN keyword selects all rows from both tables as long as there is a match between the columns in both tables

SELECT * 
FROM table1 INNER JOIN table2 
ON table1.column_name = table2.column_name
SELECT Customer.CName, Order.OrderID
FROM Customer
INNER JOIN Order
ON Customer.CustomerID=Order.CustomerID
ORDER BY Customer.CName

2020-04-03