Rename the table name in Postgresql

In this Tutorial we will see how to rename the table name in Postgresql with example. Let’s see

  • How to rename the table name in Postgresql with example.

Syntax:

ALTER TABLE table_name
RENAME TO new_table_name

The table that we use is

odetails:

Rename the table name in postgresql 1

 

Lets rename the above table  as OrderDetails as shown below

ALTER TABLE odetails 
RENAME TO OrderDetails

So the new table name is “OrderDetails”

 

                                                                                         

Author

  • Sridhar Venkatachalam

    With close to 10 years on Experience in data science and machine learning Have extensively worked on programming languages like R, Python (Pandas), SAS, Pyspark.