Source Table 1: POSTALCODES
|
Source Table 2: UNITEDSTATES
|
Target Table: State_Data
|
---|---|---|
Name
Code
|
Name
Capital
Population
Area
Continent
Statehood
|
Name
Code
Capital
Population
Area
Continent
Statehood
|
Join Type
|
Description
|
Data Included in Results
|
Implicit or Explicit Status
|
---|---|---|---|
Inner
|
Combines and displays only the
rows from the first table that match rows from the second table, based
on the matching criteria that are specified in the WHERE clause.
|
50 rows: 50 matches on name column;
0 non-matches
|
Implicit
|
Full
|
Retrieves both the matching rows
and the non-matching rows from both tables.
|
59 rows: 50 matches on name column;
8 non-matches from POSTALCODES (left table); 1 non-match from UNITEDSTATES
(right table)
|
Explicit
|
Left
|
Retrieves both the matching rows
and the non-matching rows from the left table.
|
58 rows: 50 matches on name column;
8 non-matches from POSTALCODES (left table)
|
Explicit
|
Right
|
Retrieves both the matching rows
and the non-matching rows from the right table.
|
51 rows: 50 matches on name column;
1 non-match from UNITEDSTATES (right table)
|
Explicit
|
Cross
|
Combines each row in the first
table with every row in the second table (creating a Cartesian product
of the tables).
|
2958 rows
|
Explicit
|
Union
|
Selects unique rows from both tables
together and overlays the columns. PROC SQL first concatenates and
sorts the rows from the two tables, and then eliminates any duplicate
rows. See the following display for the results of a sample union
join.
|
109 rows: 58 rows from POSTALCODES
(left table); 51 rows from UNITEDSTATES (right table)
|
Explicit
|