Databases Reference
In-Depth Information
Emp ID Emp Name Cn Cntry Name
---------- --------------- -- --------------------
100 King AR Argentina
101 Kochhar AR Argentina
102 De Haan AR Argentina
103 Hunold AR Argentina
...
201 Hartstein ZW Zimbabwe
202 Fay ZW Zimbabwe
203 Mavris ZW Zimbabwe
204 Baer ZW Zimbabwe
205 Higgins ZW Zimbabwe
206 Gietz ZW Zimbabwe
2675 rows selected.
Oracle9 i Cartesian Product Syntax
The same query using the Oracle9 i syntax is similar, except that CROSS JOIN is
used to separate the two tables that are queried to produce a Cartesian product.
Janice changes the previous query to use the Oracle9 i version:
select e.employee_id "Emp ID", e.last_name "Emp Name",
c.country_id "Cntry ID", c.country_name "Cntry Name"
from employees e cross join countries c;
Emp ID Emp Name Cn Cntry Name
---------- --------------- -- --------------------
100 King AR Argentina
101 Kochhar AR Argentina
102 De Haan AR Argentina
103 Hunold AR Argentina
...
201 Hartstein ZW Zimbabwe
202 Fay ZW Zimbabwe
203 Mavris ZW Zimbabwe
204 Baer ZW Zimbabwe
205 Higgins ZW Zimbabwe
206 Gietz ZW Zimbabwe
2675 rows selected.
Search WWH ::




Custom Search