Rename a table column in PostgreSQL 

Joined:
04/07/2009
Posts:
53

June 29, 2010 14:52:45
ALTER TABLE MyTable RENAME OldColumn TO NewColumn;

-- or, with ONLY
ALTER TABLE ONLY MyTable RENAME OldColumn TO NewColumn;


If ONLY is not specified, the table and all its descendant tables (if any) are updated.
[ Comment  | Tags ]