How to Drop a Column in PostgreSQL
Last updated July 24, 2026 · By the SaturnSQL team
Use ALTER TABLE ... DROP COLUMN. The column is hidden immediately and space is reclaimed lazily by later updates and vacuums. Add CASCADE to also drop dependent views.
DROP COLUMN is a metadata change. Postgres marks the column dropped and stops returning it, but the stored data stays in place until each row is rewritten by a later UPDATE or a VACUUM FULL. The statement is therefore fast even on huge tables, though disk is not freed right away. IF EXISTS makes it safe to re-run.
ALTER TABLE orders DROP COLUMN IF EXISTS internal_notes;When views depend on it
Without CASCADE, Postgres refuses to drop a column that a view, index, or constraint depends on, and the error names the dependent object. CASCADE drops those objects too, which is quietly destructive: a view you had forgotten about disappears with no further prompt. Run the plain version first and read the error to see exactly what would go.
ALTER TABLE orders DROP COLUMN internal_notes CASCADE; -- drops dependent views tooRun this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free