FROM table1 [ LEFT | RIGHT ] JOIN table2
ON table1.field1 <operator> table2.field2
LEFT or RIGHT identifies the table (by its position in the join expression)
for which all records will be returned, even if there are no matching
records in the other table.
For example (from the help), the following query joins the Categories and
Products tables on the CategoryID field. The query produces a list of all
categories, including those that contain no products:
SELECT
CategoryName,
ProductName
FROM
Categories
LEFT JOIN
Products
ON
Categories.CategoryID = Products.CategoryID;
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.