change column name postgresql code example

Example 1: how to update column name in psql

ALTER TABLE table_name
  RENAME COLUMN old_name TO new_name;

Example 2: psql filed name alter

ALTER TABLE table_name 
RENAME column_name TO new_column_name;

Example 3: how to update column name in psql

ALTER TABLE order_details
  RENAME TO order_information;

Example 4: rename column postgres

ALTER TABLE distributors RENAME COLUMN address TO city;

Example 5: how to update column name in psql

ALTER TABLE order_details
  DROP COLUMN notes;

Tags:

Sql Example