Aliasing

Knowing how to alias saves you typing

SELECT P.FName, P.LName, T.CatName
FROM People P
RIGHT OUTER JOIN TypePeople T
ON P.Category=T.ID




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


Another way of aliasing can be seen in the COUNT example



Come learn HTML or Classic ASP in Honolulu, Hawaii!

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