Rename a table column in PostgreSQL
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.