Using Natural Joins
A Brief Overview
A natural join automatically
selects columns from each table to match rows. With a natural join,
PROC SQL identifies columns in each table that have the same name
and type, and uses those as the join criteria. The advantage of using
a natural join is that the coding is streamlined. The ON clause is
implied, and you do not need to use table aliases to qualify column
names that are common to both tables.
If you specify a natural join on tables that do not have at least one column with a common name and type, the result is a Cartesian product. You can use a WHERE clause to limit the output. Because the natural join makes certain assumptions about what you want to accomplish, you should examine your data ...
Get SAS Certified Professional Prep Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.