Обсуждение: Rename of a Table Column

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

Rename of a Table Column

От
"James Kelty"
Дата:
I have a table with a column that needs renameing. I do not know how to do
this, and if anyone could point me in the right direction, I would really
appreciate it!

Thanks.

-James


--
James Kelty
Sr. Unix Systems Administrator
The Ashland Agency
541.488.0801
jamesk@ashlandagency.com



Re: Rename of a Table Column

От
Stephan Szabo
Дата:
ALTER TABLE <table> RENAME <old> TO <new>
should do it.

On Fri, 19 Oct 2001, James Kelty wrote:

> I have a table with a column that needs renameing. I do not know how to do
> this, and if anyone could point me in the right direction, I would really
> appreciate it!


Re: Rename of a Table Column

От
"Brett W. McCoy"
Дата:
On Fri, 19 Oct 2001, James Kelty wrote:

> I have a table with a column that needs renameing. I do not know how to do
> this, and if anyone could point me in the right direction, I would really
> appreciate it!

ALTER TABLE <table> RENAME <oldname> TO <newname>;

This is documented in the PostgreSQL reference manual:

http://postgresql.cokernet.com/users-lounge/docs/7.1/reference/

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
Chicken Little only has to be right once.