Re: Add columns to table; insert values based on row
От | Adrian Klaver |
---|---|
Тема | Re: Add columns to table; insert values based on row |
Дата | |
Msg-id | b7f52e5f-b116-9e36-acad-b306bb5a64b8@aklaver.com обсуждение исходный текст |
Ответ на | Add columns to table; insert values based on row (Rich Shepard <rshepard@appl-ecosys.com>) |
Ответы |
Re: Add columns to table; insert values based on row
|
Список | pgsql-general |
On 11/1/18 1:23 PM, Rich Shepard wrote: > I have the following code in a script: > > alter table stations add column start_date date; > alter table stations add column end_date date; > alter table stations add column howmany integer; > alter table stations add column bin_col char(8); > > insert into stations (start_date, end_date, howmany, bin_col) values ( ) > select site_nbr from stations > where site_nbr = ' '; I am not following the above. Are you trying to add new data to existing records? If so where is the new data coming from? > > The table has 82 rows. Is there a more elegant way to insert data > specific > to a site_nbr other than 82 repetitions of the insert statement? (I suspect > not, but I might be wrong and learn something valuable by asking.) > > Regards, > > Rich > > -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: