Left Outer Join

A Left Outer Join will take two tables and join them together based on the linking field

A Left Outer Join will include ALL entries from the table on the LEFT

SELECT People.FName, People.LName, TypePeople.CatName FROM People LEFT OUTER JOIN TypePeople on People.Category=TypePeople.ID

THE SQL above will join two tables where People has a field in it(Category) linked to TypePeople(ID).

The tables may look like the following:
People
FNameLNameCategory
JohnSmith1
AlJones2
JimBrown4
TypePeople
IDCatName
1Employee
2Customer
3Supplier
The Resulting Table will look like this:
RESULT
FNameLNameCatName
JohnSmithEmployee
AlJonesCustomer
JimBrownNull



Come learn HTML or Classic ASP in Honolulu, Hawaii!

HOME | SQL Tutorials | XML Tutorials | OKIWEB | EMAIL ME | ASP Alliance