How to drop multiple columns in postgresql

I want to drop 200 columns in my table in PostgreSQL. I tried:

ALTER TABLE my_table
DROP COLUMN col1, col2

But I get an error like this:

ERROR: syntax error at or near "col2"


Solution 1:

Check this:

ALTER TABLE table DROP COLUMN col1, DROP COLUMN col2;