Re: Bulk coying of data from one table to another - Mailing list pgsql-general

From Devrim GUNDUZ
Subject Re: Bulk coying of data from one table to another
Date
Msg-id Pine.LNX.4.44.0306021404470.22058-100000@emo.org.tr
Whole thread Raw
In response to Bulk coying of data from one table to another  ("shoaib" <shoaibm@vmoksha.com>)
List pgsql-general
Hi,

On Mon, 2 Jun 2003, shoaib wrote:

> I want to run a process of archival which will delete data form one
> table and insert into another based on date critria.

If you've created the new table; then the following might be useful for
you:

INSERT INTO new_table SELECT * FROM old_table WHERE date_condition;

If you haven't creted the table; then use:

CREATE TABLE new_table AS SELECT * FROM old_table WHERE date_condition.

Regards,
--
Devrim GUNDUZ
devrim@gunduz.org                devrim.gunduz@linux.org.tr
            http://www.tdmsoft.com
            http://www.gunduz.org



pgsql-general by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Re: PostgreSQL presentation in France
Next
From: "shreedhar"
Date:
Subject: Re: Bulk coying of data from one table to another