Women in Technology

Hear us Roar



Article:
  More on JOINS
Subject:   Example for Cross Join
Date:   2001-06-08 06:09:25
From:   wallinbl
Can you provide an example of when you would use a cross join when you write that article? I've often wondered what that would be useful for.
Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Example for Cross Join
    2007-01-29 21:36:38  sv1241 [View]

    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: