Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You can use a join to associate the rows of one table with the rows of another. Often you do this to follow a foreign key reference. For example, consider an employee table that contains a column with the id of the department for each employee. If you need to see the name of the department for each employee, you can use a JOIN, as in:
SELECT employee.name, department.name FROM employee JOIN department ON (employee.department=department.id)