Database Reference
In-Depth Information
Output:
Result
---------------------
BLAKE works for KING
CLARK works for KING
JONES works for KING
FORD works for JONES
SMITH works for FORD
ALLEN works for BLAKE
WARD works for BLAKE
MARTIN works for BLAKE
SCOTT works for JONES
TURNER works for BLAKE
ADAMS works for SCOTT
JAMES works for BLAKE
MILLER works for CLARK
Cartesian Product
If in the Join statement you forget to put the WHERE condition
or intentionally don't write the WHERE clause at all, the result
will be Cartesian product. Such type of output will be very rarely
useful. If one table had five records and other one had six
records; in the output you will get thirty records (5x6=30).
That's why we use the word product with such type of join.
Equijoin and Outer Join
In the word Equijoin, Equi comes because we use Equal sign (=)
in the join condition. The query containing Equijoin will give
you total number of records equal to or less than the number of
records of the one table among all the tables we have used in the
query having least number of records in it. Let's take a example
of two table Equijoin query like the one shown in the Figure 2-9,
only those records will be displayed from either of two tables
Search WWH ::




Custom Search