From: Ragnar <gnari@hive.is>
To: marchesini@unipg.it
Cc: pgsql-sql@postgresql.org
Subject: Re: join a lot of columns of two tables
Date: Thu, 14 Dec 2006 12:10:59 +0000
Message-ID: <1166098259.6369.138.camel@localhost.localdomain> (raw)
In-Reply-To: <1166094060.5978.22.camel@geoivan>
References: <1166094060.5978.22.camel@geoivan>
On fim, 2006-12-14 at 12:01 +0100, ivan marchesini wrote:
> Dear Postgres Users,
> I have 2 tables...
> each one has a column called ID (primary keys of each table)
> the values into each ID column are exactly the same.
>
> each table has a lot of other columns (around 50 for each table)....
>
> I would like to create a table containing the ID (only one column
> obviously) and all the other columns of both tables...
>
> a simple equi join for each column is simple but how can I join
> completely the two table on the bases of the column ID???
>
> probably it is a simple question but I don't know how to solve this very
> simple problem quikly... :-(
> thanks
select * from t1 join t2 USING (id);
gnari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gnari@hive.is, marchesini@unipg.it
Subject: Re: join a lot of columns of two tables
In-Reply-To: <1166098259.6369.138.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox