Alter table rename table name

PostreSQL tutorial – Rename table

Rename name of existing table

How to rename the name of existing table. Alter syntax and example.

Syntax

ALTER TABLE old_table_name 
RENAME TO new_table_name;

Example Rename column

ALTER TABLE customers 
RENAME TO buyers; 

Alter table |
Drop table