Rishu S
Rishu S

Reputation: 3968

Renaming a column starting with '?column?'

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

Answers (1)

Clodoaldo Neto
Clodoaldo Neto

Reputation: 125244

Use double quotes for identifiers:

alter table <table_name> rename column "?column?" to age;

Upvotes: 4

Related Questions