Join (SQL): Meaning (information, definition, explanation, facts)

A join combines records from two or more tables in a relational database. In the Structured Query Language (SQL), there are several types of joins, including "inner" and "outer". They all work by linking records on a key field.

The simplest type of join doesn't even use the JOIN keyword. For example, given employee and department tables as follows:

LastName DepartmentID ---- ------- Smith 34 Jones 33 Robinson 34 Jasper 34 Steinberg 33 Rafferty 31

DepartmentName DepartmentID ---- -- Sales 31 Engineering 33 Clerical 34

Use this SQL statement to join the tables:

SELECT LastName, DepartmentName FROM employee, department WHERE employee.DepartmentID = department.DepartmentID

Your result set will be:

LastName DepartmentName ---- --- Smith Clerical Jones Engineering Robinson Clerical Jasper Clerical Steinberg Engineering Rafferty Sales

Find more facts
 
Further reference
Remember what Join (SQL) means:
Other sources
Search for Join (SQL) information on:  amazon.com
Your reference for information, definition
http://explanation-guide.info/meaning/Join-(SQL).html
Licensing information:
This article uses material from Wikipedia (credits) and is made available under the terms of the GNU FDL (copy).
Image licensing information is accessible by clicking the image.

Welcome, guest!
You are not logged in
ID:
Password:

Social bookmarks


Book search

Recent searches