Syndicate content

closer look

Jul 14

A Closer Look at SQL Joins

Tue, 07/14/2009 - 18:51 — julie

SQL is by far one of the most popular and powerful languages for dealing with databases, and, to me, one of its greatest (and basic) features is the ability to join tables. Doing so is a necessity for anyone who finds himself working with two or more tables which are interconnected.

In the business world, it’s common practice to have, for example, a table with customer data and order ids, a second table containing - for each order id - the products ordered, and another table in which products descriptions are stored.

The problem arises whenever we have the need to find what products a customer, identified by a number, has ordered.

Table Setup

For clarity and ease of explanation and understanding, we’ll simplify the above situation just a bit.


Copyright 2009. E-mail Me
Auto Spare Parts