How to DROP multiple columns with a single ALTER TABLE statement in SQL Server?
DROP COLUMN statement is used to remove columns from a table. DROP COLUMN works for any database type described above. Therefore, SQL Server can be used to drop columns from DBO, model, or TempDB and the same way – in Oracle, Sybase, etc. For Me, SQL needs to use ALTER TABLE.DROP COLUMN .., PostgreSQL use alter table..rename column, DB2 use alter table..drop column. The column must not contain any data before it is removed.
psql drop column
ALTER TABLE table_name DROP COLUMN column_name;
how remove column in mysql
ALTER TABLE "table_name" DROP "column_name";
ALTER TABLE table_name DROP COLUMN column_name
sql drop column
ALTER TABLE my_schema.my_table DROP COLUMN my_column;
sql query alter table drop column
ALTER TABLE Customers DROP COLUMN ContactName;
sql remove column from table
ALTER TABLE tableName DROP columnName;
The discussion above explains the use of a single DROP statement to drop more than one column in SQL Server. While there can be some adverse impacts, it might be necessary for you to do so.