Database Tutorial

Course Tutorial Site

Site Admin

Non-equijoin

without comments

Non-equijoins differ from equijoins because they use either an inequality operator or a range operator. They are always a filtered outcome of a CROSS JOIN between tables. A CROSS JOIN returns all possibilities between rows of two tables. You can filter that Cartesian result set by comparing the inequality relationship between a column in each table or a set of like columns in each table. Likewise, you can filter the Cartesian result set by comparing whether a column value in one table is BETWEEN two columns in the other table.

Range non-equijoin
A range non-equijoin typically compares whether a column value in one table is found between a pair of column values in another table.
Inequality non-equijoin
An inequality non-equijoin typically compares an inequality relationship between a column value in one table against a column value in another table. It may also use an AND or OR logical operator to make multiple column comparisons.

The following scrollable list exams the range and inequality syntax for non-equijoins. They’re defined in the ANSI SQL:89 definition and are generally portable across database implementations.

Written by michaelmclaughlin

February 16th, 2010 at 12:18 am

Posted in

Leave a Reply