drop column sql with constraints code example
Example 1: drop columnsql
ALTER TABLE table_name
DROP COLUMN column_name
Example 2: drop table with constraints
1. 'First Drop contrstraints like this'
ALTER TABLE table_name
DROP CONSTRAINT constraint_name;
2. 'Then drop table'
DROP TABLE table_name;
Example 3: 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