Udostępnij za pośrednictwem


Modifying Columns (Visual Database Tools)

To add, change, or delete columns in a table, use Table Designer. In Table Designer, each table column appears as a row in a grid, and the columns of the grid represent the properties of the table column.

To define a table's columns, edit the properties shown in the Column Properties tab in the lower pane of Table Designer. For details about the properties that are available in your database, see your database documentation.

Note

Changing table columns can cause code and applications that depend on the modified column to fail. These include queries, views, stored procedures, user-defined functions, and client applications. Note that these failures will cascade. For example, a stored procedure that calls a user-defined function that depends on the modified column may fail. Carefully consider any changes you want to make to a table column.

Note

If the table is published for replication, you must make schema changes using the Transact-SQL statement ALTER TABLE or SQL Server Management Objects (SMO). When schema changes are made using the Table Designer or the Database Diagram Designer, it attempts to drop and recreate the table. You cannot drop published objects, therefore the schema change will fail.

In This Section

  • How to: Specify Computed Columns (Visual Database Tools)
    Describes how to enter a computed column expression and set properties for the column and expression. Computed columns use a mathematical or other expression to generate results for a column, optionally using data from other columns.
  • How to: Modify Column Identity Properties (Visual Database Tools)
    Describes how to change the identity properties of a column. Identity properties pertain to identity columns, which guarantee the uniqueness of the row to which the identity column belongs. Identity properties define, among other things, how new values are determined when a row is added.