logo       

SQL Question: msg#00025

cms.cold-fusion.user.azcfug

Subject: SQL Question

Hi, gang,

I understand the basic syntax of a left join, e.g.:

SELECT * FROM Establishments
LEFT JOIN States ON
States.StateCode = Establishments.EstablishmentStateCode
WHERE EstablishmentKey = 14408

...and I understand that such a join will pull a unique row from a
separate table (states) based on the tie between them (statecode).

Can I indicate WHICH columns of that joined States row I want to pull,
or do I have to pull the whole thing? What if a States column has the
same name as a column in the Establishments table?

Also, where do you all commonly use left joins? And what are right
joins? Can some of you help me understand some of the ins and outs of
these creatures?

Thanks!

---Judd Miller


__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail ? Free email you can access from anywhere!
http://mail.yahoo.com/





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise