Share via


How to: Modify Column Precision

The precision of a numeric column refers to the maximum number of digits used by the selected data type. For most data types, the column precision is automatically defined by the data type. You can change the column precision for the decimal and numeric data types if you want to redefine the column length.

The Precision property is not provided in the Column Properties tab of a column whose data type is not decimal or numeric.

Note

A new version of Table Designer appears for databases in the SQL Server 2012 format. This topic describes the old version of Table Designer, which you use with databases in earlier formats of SQL Server.

In the new version, you can change a table definition through a graphical interface or directly in a script pane. If you use the graphical interface, the table’s definition is automatically updated in the script pane. To apply the SQL code in the script pane, choose the Update button. For more information about the new version, see How to: Create Database Objects Using Table Designer.

Note

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.

To modify the precision of a columns data type

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

    The table opens in Table Designer.

  2. Select the column for which you want to change the precision.

  3. In Column Properties tab, click the grid cell for the Precision property and enter a value for the precision.

    Note

    The Precision property applies to decimal and numeric types only.

The new precision value is assigned to the column in Table Designer 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.

See Also

Reference

Column Properties

Other Resources

Working with Columns