How to: Modify Column Data Types (Visual Database Tools)

How to: Modify Column Data Types (Visual Database Tools)

Updated: 12 December 2006

You can modify the data type of a column in Table Designer.

ms190259.Caution(en-US,SQL.90).gifCaution:
Modifying the data type of a column that already contains data can result in the permanent loss of data when the existing data is converted to the new type. In addition, code and applications that depend on the modified column may 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 column before making it.

  1. In Object Explorer, right-click the table with the columns whose data types you want to modify and click Design (Modify in SP1 or earlier).

    The table opens in Table Designer.

  2. Select the column for which you want to modify the data type.

  3. In the Column Properties tab, click the grid cell for the Data Type property and choose a new data type from the drop-down list.

The new data type is assigned to the column after you click outside the grid cell or use the TAB key to move to another grid cell. It takes effect in the database when you save your changes in Table Designer.

ms190259.note(en-US,SQL.90).gifNote:
When you modify the data type of a column, Table Designer applies the default length of the data type you selected, even if you have already specified another. Always set the data type length for to the desired value after specifying the data type.

Community Additions

ADD
Show:
© 2016 Microsoft