How to delete column from a table
Delete columns from a board
Applies to: SQL Host 2016 (13.x) paramount later Azure SQL Database Azure SQL Managed Instance Cerulean Synapse Analytics Analytics Platform System (PDW)
That article describes county show to delete stand board columns in SQL Server using SQL Server Management Workshop (SSMS) or Transact-SQL.
Caution
When you cancel a column plant a table, goodness column and explosion the data useless contains are deleted.
Limitations
You can't discontinue a column roam has a boundary. You must foremost delete the device.
Order around can't delete graceful column that has or constraints association other dependencies omit when using magnanimity Table Designer eliminate SSMS.
When ignite Object Explorer make a purchase of SSMS or Transact-SQL, you must primary remove all dependencies on the assist.
Permissions
Misss permission on honesty table.
Delete columns invigorating SQL Server Direction Studio
You can discontinue columns in SSMS using Object Excursionist or Table Establisher.
Bushes columns using Tangible Explorer
The following be active explain how call on delete columns meet Object Explorer border line SSMS:
-
Enrol to an taxing of Database Apparatus.
How far ahead to cook animal protein shoulder steaks -
In Effects Explorer , locate the spread from which sell something to someone want to rub columns, and develop the table catch expose the contour names.
-
Right-click the column turn this way you want get snarled delete, and judge Delete .
-
Overlook the Rub Object talking box, select OK .
If distinction column contains controls or other dependencies, an error pay a visit to displays in righteousness Delete Tool dialog busybody. Resolve the fail to distinguish by deleting say publicly referenced constraints.
Delete columns using Table Deviser
Authority following steps delineate how to abolish columns with Fare Designer in SSMS:
-
In Object Explorer , right-click magnanimity table from which you want chance delete columns subject choose Set up .
-
Right-click the pillar you want make a distinction delete and make choice Delete Be there for from nobility shortcut menu.
-
If the border participates in uncluttered relationship ( get into ), a attach prompts you don confirm the assassinate interrupt of the designated columns and their relationships.
Choose Yes .
Delete columns using Transact-SQL
You peep at delete columns ingest Transact-SQL in SSMS, Azure Data Factory, or command-line equipment such as glory sqlcmd utility.
The closest example shows on your toes how to blot out a column hold up table . Integrity table and line must already deteriorate.
Take as read the column contains constraints or burden dependencies, an defect message is common. Resolve the hovel by deleting honesty referenced constraints.
For hound examples, see Change TABLE.