René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

ANSI 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:
   COL_ONE COL_TWO     COL_THREE COL_FOUR
---------- ---------- ---------- ----------
         1 one                10 ten
         1 one                20 twenty
         1 one                 5 five
         2 two                10 ten
         2 two                20 twenty
         2 two                 5 five

Links

See also other ANSI joins.