Re: Insert using a subselect?

Поиск
Список
Период
Сортировка
От A_Schnabel@t-online.de (Andre Schnabel)
Тема Re: Insert using a subselect?
Дата
Msg-id 001a01c13c81$74f14060$0201a8c0@aschnabel.homeip.net
обсуждение исходный текст
Ответ на Re: Insert using a subselect?  (Francisco Reyes <lists@natserv.com>)
Список pgsql-novice
----- Original Message -----
From: "Francisco Reyes" <lists@natserv.com>
Subject: Re: [NOVICE] Insert using a subselect?


>
> so it is not possible to populate an insert from a subselect if there is
> more than one row/column?

Of course, it is.
But you should just either use he keyword "values" or use a select.

The right statement is:
insert into hearn_dates (date)
select distinct merge_date from hearn;

For further details have a look at the iDoc's
http://www.postgresql.org/idocs/index.php?sql-insert.html

Andre


В списке pgsql-novice по дате отправления:

Предыдущее
От: Francisco Reyes
Дата:
Сообщение: Re: Insert using a subselect?
Следующее
От: "Sykora, Dale"
Дата:
Сообщение: [novice] pg_regress.sh problem