How to drop column if it exists in PostgreSQL 9+? February 17, 2023 by Tarik You just need to add IF EXIST to your DROP COLUMN statement: ALTER TABLE tableName DROP COLUMN IF EXISTS columnName;