Re: Copying rows between tables? - Mailing list pgsql-sql

From Sai Hertz And Control Systems
Subject Re: Copying rows between tables?
Date
Msg-id 40043DD4.4090802@sancharnet.in
Whole thread Raw
In response to Copying rows between tables?  (Steve Wampler <swampler@noao.edu>)
List pgsql-sql
Dear Steve Wampler

>I have an application where old records are archived into
>'archive' tables.  Occasionally there is a need to copy
>some of these old records into the 'active' table.
>  
>
source_table(id: bigserial,uname: char,x1: char,x2: char,x3: char,x4: char)
dest_table(id: bigserial,uname: char,x11: char,x21: char,x31: char,x41: 
char)

you will do some thing like
insert into dest_table(id,uname,x11,x21) (select id,uname,x1,x2 from 
source_table)

Shootback if this helps


Regards,
Vishal Kashyap



pgsql-sql by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: can insert 'null' into timestamp type field from command
Next
From: beyaRecords - The home Urban music
Date:
Subject: Configure issues