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.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.