How to: Delete Columns from a Table (Visual Database Tools)

When you delete a column from the table in Table Designer, once you save the changes, it and all the data it contains are deleted from the database.

Warning

This action cannot be undone once the table is saved. The only way to restore a deleted column is to close the table without saving changes.

To delete columns from a table

  1. In Object Explorer, right-click the table to which you want to add columns and choose Design.

    Table Designer opens with the cursor placed in the first blank cell in the Column Name column. You can also right-click a row in the table and select Insert Column from the shortcut menu. A blank column row is inserted.

  2. Select the column you want to delete.

  3. Right-click the column and choose Delete Column from the shortcut menu.

  4. If the column participates in a relationship, a message prompts you to confirm the deletion of the selected columns and their relationships. Choose Yes.

If the column does not participate in a check constraint, then the column, any constraints attached to it, any relationships it participates in, and any data contained in the column are provisionally removed from the database. They are permanently deleted from the database when you save the table.

If the column does participate in a check constraint, the database server will reject your modification when you try to save your work. That is, the commit operation will fail. To delete a column that participates in a check constraint, you must first modify or remove the check constraint before you can delete the column.