Rename a table column in PostgreSQL 

Joined:
04/07/2009
Posts:
135

June 29, 2010 14:52:45    Last update: 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.
Share |
| Comment  | Tags