Previous Page
Next Page

Using Joins and Join Conditions

Before wrapping up this two-chapter discussion on joins, it is worthwhile to summarize some key points regarding joins and their use:

  • Pay careful attention to the type of join being used. More often than not, you'll want an inner join, but there are often valid uses for outer joins, too.

  • Make sure you use the correct join condition, or you'll return incorrect data.

  • Make sure you always provide a join condition, or you'll end up with the Cartesian product.

  • You may include multiple tables in a join and even have different join types for each. Although this is legal and often useful, make sure you test each join separately before testing them together. This makes troubleshooting far simpler.


Previous Page
Next Page