How to used SQL JOIN Statement

The SQL JOIN Statement linking two or more tables to get all the information field.

The JOIN Format :

SELECT 
    <A.FIELDNAME>, 
    <B.FIELDNAME>,
    ....
FROM <TABLE_A> A
INNER JOIN <TABLE_B> B
ON <A.ID_JOIN>=<B.ID_JOIN>; 

 

The JOIN Example :

SELECT 
    TR.TransactionID, 
    CUST.CustomerName, 
    TR.TransactionDate
FROM TRANSACTION TR
INNER JOIN CUSTOMERS CUST
ON TR.CustomerID=CUST.CustomerID; 

 

Leave a Comment.