Thread: Rename of a Table Column

Rename of a Table Column

From
"James Kelty"
Date:
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

From
Stephan Szabo
Date:
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

From
"Brett W. McCoy"
Date:
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.