Re: Add columns to table; insert values based on row

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Add columns to table; insert values based on row
Date: 2018-11-01 20:53:25
Message-ID: alpine.LNX.2.20.1811011351090.13759@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 1 Nov 2018, David G. Johnston wrote:

> That makes no sense to me...you already have 82 rows on the table so if you
> insert 82 more you'll have 164 which doesn't seem like what you would
> want...
>
> I would probably do:

David,

The table already exists with four attribute columns and their data. I'm
adding four new columns and their data base on the existing row's value in
column site_nbr.

Based on your and Adrian's responses I'll go ahead and enter the values
filled intert statements for each row.

Thanks,

Rich

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-11-01 20:57:01 Re: Add columns to table; insert values based on row
Previous Message Rich Shepard 2018-11-01 20:50:39 Re: Add columns to table; insert values based on row