Skip site navigation (1) Skip section navigation (2)

Re: Copying rows between tables?

From: Sai Hertz And Control Systems <sank89(at)sancharnet(dot)in>
To: swampler(at)noao(dot)edu
Cc: Postgres-SQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Copying rows between tables?
Date: 2004-01-13 18:49:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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: 

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

Shootback if this helps

Vishal Kashyap

In response to

pgsql-sql by date

Next:From: OizOneDate: 2004-01-13 19:34:08
Subject: help with limiting query results
Previous:From: beyaRecords - The home Urban musicDate: 2004-01-13 18:45:55
Subject: Configure issues

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group