Previous Topic: SELECT Statement Select-Into SyntaxNext Topic: Outer Join Example


Inner Join Example

The following example of an inner join only returns rows where the CUSTOMER table has a matching row in the ORDERS table:

 SELECT T1.NAME, SUM(T2.AMOUNT)
 FROM CUSTOMER T1, ORDERS T2
 WHERE   T1.CUSTNO = T2.CUSTNO
 GROUP BY T1.NAME;