sql drop multiple columns if exists

Solutions on MaxInterview for sql drop multiple columns if exists by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "sql drop multiple columns if exists"
Marianne
01 Jan 2019
1-- SQL Server
2ALTER TABLE t DROP COLUMN IF EXISTS col1, 
3                   COLUMN IF EXISTS col2;
Diana
03 Jan 2020
1ALTER TABLE TableName
2    DROP COLUMN Column1,
3    DROP COLUMN Column2;
4