Search the Whole World Here.,.,

SQL - INNER JOIN Example




The following SQL statement will return all customers with orders:

Example

SELECT Customers.CustomerName, Orders.OrderID
FROM Customers
INNER JOIN Orders
ON Customers.CustomerID=Orders.CustomerID
ORDER BY Customers.CustomerName;
Try it Yourself »
Note: The INNER JOIN keyword selects all rows from both tables as long as there is a 
match between the columns. If there are rows in the "Customers" table that do not have matches in "Orders", these customers will NOT be listed.

Related Posts


EmoticonEmoticon

:)
:(
=(
^_^
:D
=D
=)D
|o|
@@,
;)
:-bd
:-d
:p
:ng
:lv