List:General Discussion« Previous MessageNext Message »
From:Olexandr Melnyk Date:June 19 2007 12:01pm
Subject:Re: selecting everyting from 2 non-identical tables.
View as plain text  
select id, name, age, null as height
  from table1
union
select id, name, null as age, height
  from table2

2007/6/19, ross@stripped <ross@stripped>:
>
> select * from table1, table2 seems to give repeat rows for some reason.


It is a Cartesian product.

-- 
Sincerely yours,
Olexandr Melnyk
http://omelnyk.net/

Thread
selecting everyting from 2 non-identical tables.ross19 Jun
  • RE: selecting everyting from 2 non-identical tables.Jay Blanchard19 Jun
    • Re: selecting everyting from 2 non-identical tables.ross19 Jun
      • Re: selecting everyting from 2 non-identical tables.Olexandr Melnyk19 Jun
        • Re: selecting everyting from 2 non-identical tables.Mogens Melander20 Jun
  • Re: selecting everyting from 2 non-identical tables.Olexandr Melnyk19 Jun