Answers for "drop column with its constraint microsoft sql"

SQL
1

drop column if exists sql server

-- SQL Server
ALTER TABLE t DROP COLUMN IF EXISTS col1, 
                   COLUMN IF EXISTS col2;
Posted by: Guest on August-13-2021
0

How to drop columns with constraint from a table in sql script

alter table tableName drop constraint [ConstraintName]
go
alter table tableName drop column columnName
Posted by: Guest on January-05-2021

Code answers related to "drop column with its constraint microsoft sql"

Code answers related to "SQL"

Browse Popular Code Answers by Language