Re: Duplicated tables of certain columns

From: Vibhor Kumar <vibhor(dot)kumar(at)enterprisedb(dot)com>
To: Yan Cheng CHEOK <yccheok(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Duplicated tables of certain columns
Date: 2011-02-21 08:16:26
Message-ID: 4F3E2293-BEDB-4417-AD54-0049A64D8CD4@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Feb 21, 2011, at 1:39 PM, Yan Cheng CHEOK wrote:

> INSERT INTO backup_table SELECT * FROM unit_11 WHERE status = 1;

You can try something like,
INSERT INTO backup_table select unit_id, 99, status, value from unit_11 where status=1;

Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Cell: +91-932-568-2279
vibhor(dot)kumar(at)enterprisedb(dot)com
Blog:http://vibhork.blogspot.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vibhor Kumar 2011-02-21 08:19:05 Re: Schema Archive cant find table
Previous Message Yan Cheng CHEOK 2011-02-21 08:09:07 Duplicated tables of certain columns