reorder columns?

Поиск
Список
Период
Сортировка
Искать

reorder columns?

От:
"Andy Kriger" <akriger@greaterthanone.com>
Дата:
is there a way to reorder columns in psql?
or to alter table and add columns after a specified columns?

if not, is my only option to recreate the table with columns in the desired
order and select into that table?

thx
a


Re: reorder columns?

От:
"scott.marlowe" <scott.marlowe@ihs.com>
Дата:
On Mon, 7 Oct 2002, Andy Kriger wrote:

> is there a way to reorder columns in psql?
> or to alter table and add columns after a specified columns?
> 
> if not, is my only option to recreate the table with columns in the desired
> order and select into that table?

Pretty much, but you can do it all at once with a statement like:

select field2, field5, field4, field1, field3 into newtable from oldtable



FAQ