>Hello,
>
>I am a translator with quite a good knowledge of programming and of
>HTML/CGI/Perl/Apache and many other web related topics.
>
>I am translating part of a book on PHP and, for the reasons
>above, I have had no problems so far.
>I am having problems however, in translating a short section where,
>discussing interaction with MySQL is discussed, the terms "left join"
>and "outer join" are mentioned.
>
>I would be really grateful to whoever could explain to me, in non
>technical English, what the two terms above mean, so that I can
>complete the translation.
>
>               Thank you in advance,
>
>                                       Marco Fioretti

Sir, a left join is a type of outer join. The full name is 'left outer join'.

An outer join is a join in which all of the rows from one of the 
tables in the join are returned. In the case of a left join, all of 
the rows from the left table are returned. For example, in table_a 
LEFT JOIN table_b, all the rows from table_a are returned. (table_a 
is to the left of 'LEFT JOIN'.) All matching rows from table_b are 
also returned. If there are no matching rows in table_b for a row in 
table_a, then the query returns NULL instead of matching rows from 
table_b. If table_a has only four rows, and table_b has only two rows 
that match rows in table_a, then
    SELECT table_a.id, table_b.id
    FROM table_a LEFT JOIN table_b USING id;
would return something like

    table_a.id     table_b.id
    __________     __________
    a              NULL
    b              b
    c              c
    d              NULL

Database programming is quite different from other types of 
programming. You always deal with data in sets, and SQL specifies the 
result without telling the computer how to produce the result. Your 
previous experience isn't going to help much in understanding SQL.

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection.     -Khushhal Khan Khatak
MySQL list magic words: sql query database

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to