Renaming multiple columns in one statement with PostgreSQL
问题 Is it possible to rename multiple columns in a single statement, something along the lines of: ALTER TABLE Users RENAME COLUMN userName TO user_name, RENAME COLUMN realName TO real_name; 回答1: No. While other actions can be combined, that's not possible with RENAME . The manual: All the forms of ALTER TABLE that act on a single table, except RENAME , SET SCHEMA , ATTACH PARTITION , and DETACH PARTITION can be combined into a list of multiple alterations to be applied together. Since RENAME is