rename column postgres
snippet in sql

rename table postgres

user3440

ALTER TABLE table_name
RENAME TO new_table_name;

psql filed name alter

user4186

ALTER TABLE table_name 
RENAME column_name TO new_column_name;

rename column postgres

user130

ALTER TABLE customers 
RENAME COLUMN name TO customer_name;

ALTER TABLE customers
RENAME COLUMN phone TO contact_phone;

how to update column name in psql

user7642

ALTER TABLE order_details
  DROP COLUMN notes;