PostgreSQL Alter table rename column from existing table
Rename column from existing table
How to rename column from existing table. Alter syntax and example.
Syntax
ALTER TABLE table_name RENAME COLUMN old_col_name TO new_col_name;
Create table
CREATE TABLE users( userid numeric not null, username varchar(100), userpass varchar(250), usermail varchar(50), address varchar(1000) );
Example Rename column
ALTER TABLE users RENAME COLUMN address TO city;