Re: URGENT!!! changing Column size

Поиск
Список
Период
Сортировка
От Gary Stainburn
Тема Re: URGENT!!! changing Column size
Дата
Msg-id 200310271750.03143.gary.stainburn@ringways.co.uk
обсуждение исходный текст
Ответ на URGENT!!! changing Column size  (mohan@physics.gmu.edu)
Список pgsql-sql
On Monday 27 Oct 2003 5:10 pm, mohan@physics.gmu.edu wrote:
> Hi can we change the size of a column in postgres. I have a table named
> institution and column name is name varchar2(25), i want to change it to
> varchar2(50). Please let me know.
>
> --Mohan

try 

alter table institution add column newname varchar2(50);
update institution set newname = name;
alter table institution drop column namel;
alter table institution rename column newname to name;


>
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     



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

Предыдущее
От: Tomasz Myrta
Дата:
Сообщение: Re: URGENT!!! changing Column size
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: extend INSERT by 'INSERT INTO table FETCH ... FROM cursor' syntax