How to DROP multiple columns with a single ALTER TABLE statement in SQL Server?

后端 未结 13 1060
星月不相逢
星月不相逢 2020-12-22 18:17

I would like to write a single SQL command to drop multiple columns from a single table in one ALTER TABLE statement.

From MSDN\'s ALTER TABLE documenta

13条回答
  •  情话喂你
    2020-12-22 18:48

    This may be late, but sharing it for the new users visiting this question. To drop multiple columns actual syntax is

    alter table tablename drop column col1, drop column col2 , drop column col3 ....
    

    So for every column you need to specify "drop column" in Mysql 5.0.45.

提交回复
热议问题