Udostępnij za pośrednictwem


How to: Modify Column Scale

The column scale refers to the maximum number of digits to the right of the decimal point for those columns of the decimal or numeric data types. By default, it is set to 0. For columns with floating point numbers, the scale is undefined because the number of digits to the right of the decimal point is not fixed.

You can change the scale for a numeric or decimal data type if you want to redefine the number of digits that can appear to the right of the decimal point.

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 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 scale and click Open Table Designer.

    The table opens in Table Designer.

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

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

    Note

    The Scale property applies to decimal or numeric types only.

The new scale 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