Re: overwrite column data select - Postgres 9.2

From: Rick Widmer <pgsql(at)rickwidmer(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: overwrite column data select - Postgres 9.2
Date: 2016-09-21 06:05:50
Message-ID: bf79b374-e5ce-37fc-cc1c-9127dca55223@rickwidmer.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> 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)

SELECT <item1>, <item2>, ..., name_first || ' ' || name_last AS email
FROM ...

You can't use SELECT *, you must list everything but email.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2016-09-21 06:31:30 Re: overwrite column data select - Postgres 9.2
Previous Message Patrick B 2016-09-21 05:56:41 Re: overwrite column data select - Postgres 9.2