Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and

Поиск
Список
Период
Сортировка
От Marco Lazzeri
Тема Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and
Дата
Msg-id 1068132317.24598.21.camel@macbeth.intranet.noze.it
обсуждение исходный текст
Ответ на Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and MOVE  ("scott.marlowe" <scott.marlowe@ihs.com>)
Ответы Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and  ("scott.marlowe" <scott.marlowe@ihs.com>)
Список pgsql-general
Il gio, 2003-11-06 alle 16:00, scott.marlowe ha scritto:
> > 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).

Good idea! But you'll lose CONSTRAINTs and DEFAULTs. Isn't it?

Cheers,
Marco


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

Предыдущее
От: Andrew Rawnsley
Дата:
Сообщение: New eRServer patch/fork release
Следующее
От: Greg Stark
Дата:
Сообщение: Fixed column format data