Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and MOVE

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and MOVE
Дата
Msg-id Pine.LNX.4.33.0311060758330.12004-100000@css120.ihs.com
обсуждение исходный текст
Ответ на INSERT and UPDATE of ALLBALLS/INFINITY dates and MOVE COLUMNS  (Marco Lazzeri <marcomail@noze.it>)
Ответы Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and
Re: Sequences without blank holes
Список pgsql-general
On Thu, 6 Nov 2003, Marco Lazzeri wrote:

> I need, also, to move columns in tables (just like the MOVE BEFORE/MOVE
> AFTER MySQL commands). Can you help me?

I do it with select into:

begin;
select field3, field2, field4, field1 into newtable from oldtable;
drop oldtable;
alter table newtable rename to oldtable;
commit; (or rollback; if something goes wrong).


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Problems with PLPGSQL
Следующее
От: Andrew Rawnsley
Дата:
Сообщение: New eRServer patch/fork release