how to select one column into another in same table?

Поиск
Список
Период
Сортировка
От J.V.
Тема how to select one column into another in same table?
Дата
Msg-id 4E8B4F62.5010308@gmail.com
обсуждение исходный текст
Ответы Re: how to select one column into another in same table?
Список pgsql-general
Currently I can select one column into another with two statements:

     alter table <table_name> add column id_old int;
     update <table_name> set id_old = id;

Is there a way to do this in one statement with a select into?  I have
tried various select statements but want the new column (with the same
data) to be in the same table and to have it execute much more quickly
that the two statements currently do.

thanks


J.V.

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

Предыдущее
От: "J.V."
Дата:
Сообщение: fail: alter table NOCHECK CONSTRAINT ALL;
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: how to select one column into another in same table?