SQL Server Performance

Allowing Column Precision more than 28

Discussion in 'General Developer Questions' started by rushmada, Jun 2, 2003.

  1. rushmada New Member

    If we create a table like this

    For ex:


    Sql query analyzer will not create and throughs up an error as

    Specified column precision 30 is greater than the maximum precision of 28.

    But if we use the statement select into it is allowing precision more than

    Assume that in this case table MYTMP is created with 28 as precision.

    For ex:

    select NO*10 'rnt' into mytmp1 from mytmp

    Here MYTMP1 will be created with precision more than 28

    My Doubt is how this is being processing in sql server and
    how it is allowing precision more than 28 in the second case.

  2. joechang New Member

    the max decimal/numeric precision was increased from 28 to 38 in SQL Server 2000, it is possible that SQL 7.0 supported 38 internally, while the announced figure was 28, this was not enforced everywhere
  3. vbkenya New Member

    In your select statement, the new (mytmp1) table's precision value is the sum (p1 + p2 + 1) of the precisions of the columns/values ( you are multiplying (in your case this is NO*10).

    Check BOL on this issue [Topic: Precision, Scale, and Length].


Share This Page