Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Difference between the joins?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00465231
Message ID:
00465242
Vues:
14
>I often hear about an inner, outer, left and right joins. What is the difference in the SQL and in the result sets.
>
>I use "FROM table1, table2 WHERE custno = custno" often and realize it only picks rows from the two tables that match. What is this kind of join called?
>
>Thanks
>
>Brenda

A WHERE acts the same as an INNER JOIN. There must be matching records in both tables for this join to return any results.

LEFT OUTER JOIN returns all records from the left table in the JOIN clause. Any records from the left table without a match in the right table will result in NULL values returned for fields in the right table.

RIGHT OUTER JOIN returns all records from the right table in the JOIN clause. Any records from the right table without a match in the left table will result in NULL values returned for fields in the left table.

FULL OUTER JOIN returns all records from both tables in the JOIN clause. Any records from either table without a match will result in NULL values for those fields.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform