Is there a way to drop multiple columns from a table or will I have to create a separate drop statement for each?
Code: Select all
dbadmin=> create table test (a int, b int, c int, d int);
CREATE TABLE
Code: Select all
dbadmin=> alter table test drop column d;
ALTER TABLE
Code: Select all
dbadmin=> alter table test drop column b, c;
ERROR 4856: Syntax error at or near "c" at character 33
LINE 1: alter table test drop column b, c;
^
dbadmin=> alter table test drop column (b, c);
ERROR 4856: Syntax error at or near "(" at character 30
LINE 1: alter table test drop column (b, c);
^