Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difference between the joins?
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00465231
Message ID:
00465242
Views:
16
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform