Re: Copy data from table to table

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Keith Worthington <keithw(at)narrowpathinc(dot)com>
Cc: PostgreSQL Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Copy data from table to table
Date: 2005-04-27 13:34:44
Message-ID: 20050427133444.GA34371@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, Apr 27, 2005 at 09:16:09AM -0400, Keith Worthington wrote:
>
> I can not think of a way to copy data directly betweeen two tables.

Have you tried INSERT ... SELECT?

INSERT INTO foo (a, b, c) SELECT a, b, c FROM bar;

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message George Weaver 2005-04-27 13:36:00 Re: Copy data from table to table
Previous Message Keith Worthington 2005-04-27 13:16:09 Copy data from table to table