Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Join synopsis?

Status
Not open for further replies.

MorganGreylock

Programmer
Jan 30, 2001
223
US
Could someone possibly post (or post a link to) a synopsis of the different types of joins (left, right, inner, outer, etc)
and what they do and when to use them? I've searched the web for some documentation, but most of the sites I've seen don't even enough examples for me to determine what it is I need to do.

It would also just be very useful knowledge and reference...

Thanks in advance,
MG
 
I didn't think it would matter, but in this project I am using postgresql on redhat linux.

MG
 
The nature of the join depends on the cardinality of the relation between the 2 tables.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
AFAIK, outer joins are for 0-1 or 0-n relations.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
AFAIK, outer joins are for 0-1 or 0-n relations.
not necessarily

you could have a 1-n relationship, for example between students and courses (student must have at least one course, so it's 1-n not 0-n) and yet still want to run a left outer join to find students who don't take math

rudy
SQL Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top