Megosztás a következőn keresztül:


How to: Rename Columns

The column name property of a column shows the name of the column as it is stored in the database. You can rename a column directly in your table in Table Designer and the database will be updated with the new name when you save the table.

Warning

Renaming a column may affect dependent triggers, stored procedures, and constraints. Consider renaming a column before you create these other objects. For more information about these database objects, see Database Objects.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To rename a column

  1. In Server Explorer, right-click the table with columns you want to rename and click Open Table Definition.

    The table opens in Table Designer.

  2. Under Column Name, select the name you want to change and type a new one.

The column is renamed in your table as soon as you exit the cell. The column is renamed in your database when you save the table.

Note

You can also change the name in the Column Properties tab. Select the column whose name you want to change and type a new value for Name.

See Also

Reference

Column Properties

Other Resources

Working with Columns