Exact Numeric (Decimal) Datatypes

Learn about exact numeric (decimal) datatypes.

Replication Server supports the following exact numeric (decimal) datatypes:
  • decimal – exact decimal numbers between -1038 and 1038 -1, inclusive.

  • numeric – exact decimal numbers between -1038 and 1038 -1, inclusive.

When you create a replication definition, omit the length and precision from numeric datatype declarations. Replication Server processes numeric values without affecting precision.
Note: If you are using a numeric datatype in a where clause in a replication definition, the value must include the precision information.

Identity columns use numeric as the underlying datatype, with exact decimal numbers of scale 0 between 1 and 1038 -1, inclusive.

When you create a replication definition for a table that contains an identity column, specify “identity” as the datatype for the column.

This command is applied to the replicated table before an insert command:
set identity_insert table_name on
This command is applied to the replicated table after an insert command:
set identity_insert table_name off

Identity columns are never updated by the update command.

If the replicate data server is Adaptive Server and a table contains an identity column, the maintenance user must be the owner of the table (or must be the “dbo” user or aliased to the “dbo” login name) at the replicate database in order to use the Transact-SQL® identity_insert option.