How to add multiple columns to a table in Postgres? How to add multiple columns to a table in Postgres? postgresql postgresql

How to add multiple columns to a table in Postgres?


Try this :

ALTER TABLE table ADD COLUMN col1 int, ADD COLUMN col2 int;


ALTER TABLE  IF EXISTS  TABLEname add ADD  COLUMN   IF NOT EXISTS  column_name data_type  [column_constraint];

detailed query where column_constraints are optional