A JOIN
clause in SQL combines records from two tables in a relational database and results in a new (temporary) table, also called joined table. Structured Query Language (SQL:2003) specifies two types of joins: inner and outer.
A programmer writes a join predicate to identify the records for JOINing. If the predicate evaluates true, then the combined record inserts into the joined (temporary) table; otherwise, it does not contribute. Any predicate supported by SQL can become a join-predicate , for example, WHERE clauses.
Mathematically, a join consists of a relation composition. It provides the fundamental operation in relational algebra and generalizes function composition.