Export (0) Print
Expand All

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

Updated: 12 December 2006

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.

ms175491.Caution(en-US,SQL.90).gifCaution:
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.

  1. In Object Explorer, right-click the table to which you want to delete columns and choose Design (Modify in SP1 or earlier).

    Table Designer opens.

  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.

Community Additions

ADD
Show:
© 2014 Microsoft