ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  More on JOINS
Subject:   Example for Cross Join
Date:   2007-01-29 21:36:38
From:   sv1241
Response to: Example for Cross Join

create table table_one (col_one number, col_two varchar2(10));
create table table_two (col_three number, col_four varchar2(10));
insert into table_one values ( 1, 'one');
insert into table_one values ( 2, 'two');
insert into table_two values (10, 'ten');
insert into table_two values (20, 'twenty');
insert into table_two values ( 5, 'five');
select * from
table_one cross join
table_two;
Each row from table_one is returned together with each row from table_two: