How to add multiple columns to a table in Redshift

Below is the syntax to add a new column to an existing table in Redshift.

alter table schemaname.tablename add columnname datatype;

However, Redshift alter table statement does not support adding multiple columns with one statement. You will have to execute one alter table statement per every column being added as shown below:

alter table schemaname.tablename add columnname1 datatype1;
alter table schemaname.tablename add columnname2 datatype2;
alter table schemaname.tablename add columnname3 datatype3;
alter table schemaname.tablename add columnname4 datatype4;
alter table schemaname.tablename add columnname5 datatype5;
See also  How to view table definition in Redshift Database