Re: Copying data from one column to another

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: Nels Lindquist <nlindq(at)maei(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Copying data from one column to another
Date: 2005-11-01 23:34:14
Message-ID: 1130888055.30174.13.camel@Andrea.peacock.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am Dienstag, den 01.11.2005, 16:03 -0700 schrieb Nels Lindquist:
> Hi there.
>
> Sorry if this is a silly question, I'm relatively new to PostgreSQL.
>
> I'm trying to copy information from one column, modify it and place
> it in another column. Is there some shortcut way to do this with an
> UPDATE statement?

Yes, this is simply UPDATE.

UPDATE sometable SET somecolumn=somefunction(someothercolumn);

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2005-11-01 23:52:45 Re: Dumb Questions - upgrade notes?
Previous Message Nels Lindquist 2005-11-01 23:03:59 Copying data from one column to another