Re: [GENERAL] copying from one table to another

From: tolik(at)aaanet(dot)ru (Anatoly K(dot) Lasareff)
To: Omega Weapon <weapon_77(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] copying from one table to another
Date: 1999-10-06 06:21:21
Message-ID: 877ll13t7i.fsf@tolikus.hq.aaanet.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>>>> "OW" == Omega Weapon <weapon_77(at)yahoo(dot)com> writes:

OW> I have two identical tables -- section and
OW> temp_section. I use the section table for keeping
OW> original values and temp_section for editing.

OW> How do I copy the values from temp_section to section?

begin;

delete from section;
insert into section select * from temp_section;

commit;

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike Mascari 1999-10-06 07:18:31 Re: [GENERAL] Yet another btree gotcha
Previous Message Charles Tassell 1999-10-06 06:02:51 Re: [GENERAL] copying from one table to another