Databases Reference
In-Depth Information
5
Chapter
Using Multiple Tables
In This Chapter
Join syntax: Pre-Oracle9
i
versus
Oracle9
i
/Oracle 10
g
SQL99 standard
Equijoins (inner joins)
So far, we have been dealing with only one table at a time in our SQL
query examples. But typically the information needed to satisfy a user
query requires more than one table. For example, the
Non-equijoins
Outer joins
Self-joins
table
has a column with a department number but not a department name; the
department name must be retrieved from the
EMPLOYEES
Cartesian products
table. You
can get this information by joining the two tables on a common column,
in this case, the
DEPARTMENTS
column. Two or more tables can also be
joined in situations where the columns may not be equal.
The boss at Scott's widget company has realized that data can be
pulled from more than one table at a time. Now the application devel-
oper and DBA, Janice, has been busy trying to keep up with his requests
for reports. Each of the join types will be discussed in this chapter, as we
follow Janice's work.
DEPARTMENT_ID
Search WWH ::




Custom Search