How to delete a column in a database table using PostgreSQL via the command line

H

How Can We Help?

How to delete a column in a database table using PostgreSQL via the command line

Use the following statement

ALTER TABLE my_table DROP COLUMN my_column;

Replace my_table with the your table name and my_column with the column that you need to drop/remove.

About the author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me