There's more than one way to do things | |
PerlMonks |
Re: SQL JOINs vs WHERE statementsby CountZero (Bishop) |
on Aug 18, 2003 at 21:27 UTC ( [id://284733]=note: print w/replies, xml ) | Need Help?? |
Consider the following situation (slightly adapted from an example in the MySQL docs): You have a staff table that contains both staff and manager's details. If you wanted a list of staff, with their corresponding manager's details as well, you would refer to the same table twice, in essence joining the table to itself. eg. Would you be able to do that with a WHERE clause instead of a JOIN? And how would you limit the results to all staff with position x? CountZero "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In Section
Seekers of Perl Wisdom
|
|