Re: how to merge a table from another DB

From: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
To: Todd(dot)Hought(at)echostar(dot)com (Hought, Todd)
Cc: pgsql-general(at)postgresql(dot)org (postgres)
Subject: Re: how to merge a table from another DB
Date: 2004-02-17 20:16:39
Message-ID: 200402172016.i1HKGdAI032393@gw.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> the forked db can be merged back in to the live one. A change to one
> column of every row in a certain table. How can I update just that field
> in every row of the db without harming the existing data already in that
> table?

Would something like this work?

UPDATE table1
set table1.columna = table2.columna
from table2
where table1.keyfield = table2.keyfield;
--
Mike Nolan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Poslusny 2004-02-17 20:40:28 Re: Select statment question
Previous Message Ron St-Pierre 2004-02-17 20:06:38 Re: String manipulation