Re: very simple: How can I multiply tables? - Mailing list pgsql-general

From Heiko Irrgang
Subject Re: very simple: How can I multiply tables?
Date
Msg-id 20010214160519.D4774@sfear.sc-networks.de
Whole thread Raw
In response to very simple: How can I multiply tables?  ("Mikhail V. Majorov" <mik@ttn.ru>)
List pgsql-general
On Wed, Feb 14, 2001 at 05:49:01PM +0300, Mikhail V. Majorov wrote:
> Hi, question
>
> How can I multiply tables using SELECT?
>
> Table 1
>
> id     surname
> --------------
> 1    AAA
>
> Table 2
>
> dt
> ---
> 12
>
> RESULT
>
> id    surname        dt
> ---------------------------
> 1    AAA        12

I think what you want is the following:
table1:
id surename
===========
1  AAA

table2:
id dt
=====
1  12

select table1.id as id, table1.surname as surname, table2.dt as dt from table1, table2 where table1.id = table2.id;

--
SC-Networks                             www: www.SC-Networks.de
Web Design, Netzwerke,
3D Animation und Multimedia
Heiko Irrgang                           Tel.: 08856/9392-00
Im Thal 2                               Fax:  08856/9392-01

82377 Penzberg                          Mail: Irrgang@SC-Networks.de

pgsql-general by date:

Previous
From: "David Reid"
Date:
Subject: Case insensitive selects?
Next
From: Ned Lilly
Date:
Subject: Re: Crash-me of PostgreSQL