How to Drop Multiple Columns with ALTER TABLE in SQL
I was looking for a concise way to drop multiple columns while using
ALTER TABLE in SQL.
There are subtle differences depending on the Database Management System (DBMS).
ALTER TABLE table_name DROP column_name1, DROP column_name2;
ALTER TABLE table_name DROP COLUMN column_name1, DROP COLUMN column_name2;
ALTER TABLE table_name DROP (column_name1, column_name2);
ALTER TABLE table_name DROP COLUMN column_name1, column_name2
More SQL Articles
- How to Format a Number with Two Decimal Places in SQLite
- How to Order By Multiple Columns in SQL
- How to Count the Number of Rows with the Same Value
- How to Order a SQL String Column By Its Numeric Value
- How to Check if a Column is Null in MySQL
- How to Combine Columns Values Into a New Column in MySQL
- What Stripe Data Do I Store in My Database?
- How To Query JSON Object with Unknown Keys in PostgreSQL
- How To Convert an Escaped JSON String in PostgreSQL to a JSON Object