Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql drop multiple columns if exists

-- SQL Server
ALTER TABLE t DROP COLUMN IF EXISTS col1, 
                   COLUMN IF EXISTS col2;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sql #drop #multiple #columns #exists
ADD COMMENT
Topic
Name
5+9 =