Re: overwrite column data select - Postgres 9.2

From: Patrick B <patrickbakerbr(at)gmail(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: overwrite column data select - Postgres 9.2
Date: 2016-09-21 05:56:41
Message-ID: CAJNY3itumpByur8a9Pw51gdWxPG7Cwuh1VDWXL9NvbkpG_rUWA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2016-09-21 17:27 GMT+12:00 John R Pierce <pierce(at)hogranch(dot)com>:

> On 9/20/2016 10:02 PM, Patrick B wrote:
>
> I've got a table with email column:
>
>> email CHARACTER VARYING(50) DEFAULT ''::CHARACTER VARYING NOT NULL,
>
>
> There are 30k rows and the email column is not null... there is data in
> there.
> But for testing purpose I need to overwrite the email. So the customer
> won't get an email from me while testing code.
>
> The email could be replaced by: test(dot)UID(at)example(dot)com
>
> How can I do that?
>
>
> update table tablename set email = 'test(dot)UID(at)example(dot)com'; ?
>
>
>

I can't overwrite the data into that column...

I was hopping that in a SELECT I could replace the data from the email
column to something else...

maybe email = name_first + name_last? Is that possible?

I can't overwrite the data into that column... that has to be done by the
select (if possible)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rick Widmer 2016-09-21 06:05:50 Re: overwrite column data select - Postgres 9.2
Previous Message John R Pierce 2016-09-21 05:27:11 Re: overwrite column data select - Postgres 9.2