PostgreSQL
 SQL >> Database >  >> RDS >> PostgreSQL

Come aggiungere una colonna se non esiste già in PostgreSQL

Con Postgres 9.6 è possibile usando l'opzione if not exists:

ALTER TABLE table_name
   ADD COLUMN IF NOT EXISTS column_name INTEGER;