Reputation: 3968
I want to rename the column in Postgresql database. The column name i am having is :
id varchar
?column? text
name varchar
I have tried using the following command:
alter table <table_name> rename column '?column?' to age;
But i am getting error. Please help me in renaming the column without dropping or recreating the table.
Upvotes: 0
Views: 83
Reputation: 125244
Use double quotes for identifiers:
alter table <table_name> rename column "?column?" to age;
Upvotes: 4