Re: insert values from a ROW object

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: insert values from a ROW object
Дата
Msg-id ns1lg6$hir$1@blaine.gmane.org
обсуждение исходный текст
Ответ на insert values from a ROW object  (Michael Moore <michaeljmoore@gmail.com>)
Список pgsql-sql
Michael Moore schrieb am 22.09.2016 um 23:42:
> for a in select * from temp_rslt
> loop
>    insert into final_rslt select row(a.*);
> end loop;
>
> I want to do something like the above. I don't want to have to name each 'a.' variable.
> Is it possible?
>

No need for a loop:
  insert into final_rsl  select *  from tmp_rslt;

This assumes that both table define the columns in the exact same order








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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: insert values from a ROW object
Следующее
От: Michael Moore
Дата:
Сообщение: Re: insert values from a ROW object