Difference between revisions of "Equality Joins"

From rbachwiki
Jump to navigation Jump to search
(Created page with "'''The most common type of join used in the workplace is based on two (or more) tables having equivalent data stored in a common column. These joins are called equality joins...")
 
Line 1: Line 1:
'''The most common type of join used in the workplace is based on two (or more) tables having equivalent data stored in a common column. These joins are called equality joins but are also referred to as equijoins, inner joins,
'''The most common type of join used in the workplace is based on two (or more) tables having equivalent data stored in a common column. '''
or simple joins.
'''These joins are called equality joins but are also referred to as equijoins, inner joins, or simple joins.'''
SELECT b.title, b.pubid, p.name
FROM books b, publisher p
WHERE b.pubid = p.pubid
AND (b.cost < 15 OR p.pubid = 1)
ORDER BY title;

Revision as of 18:44, 22 October 2017

The most common type of join used in the workplace is based on two (or more) tables having equivalent data stored in a common column. These joins are called equality joins but are also referred to as equijoins, inner joins, or simple joins.

SELECT b.title, b.pubid, p.name
FROM books b, publisher p
WHERE b.pubid = p.pubid
AND (b.cost < 15 OR p.pubid = 1)
ORDER BY title;