The numeric data types are used for storing numerical data.
The NUMERIC and DECIMAL data types, and the various kinds of INTEGER data types, are sometimes called exact numeric data types, in contrast to the approximate numeric data types FLOAT, DOUBLE, and REAL.
The exact numeric data types are those for which precision and scale values can be specified, while approximate numeric data types are stored in a predefined manner. Only exact numeric data is guaranteed accurate to the least significant digit specified after an arithmetic operation.
Data type lengths and precision of less than one are not allowed.
Only the NUMERIC data type with scale = 0 can be used for the Transact-SQL identity column.
Be careful using default precision and scale settings for NUMERIC and DECIMAL data types, because these settings could be different in other database solutions. In SQL Anywhere, the default precision is 30 and the default scale is 6.
You should avoid default precision and scale settings for NUMERIC and DECIMAL data types, because these are different between SQL Anywhere and Adaptive Server Enterprise. In SQL Anywhere, the default precision is 30 and the default scale is 6. In Adaptive Server Enterprise, the default precision is 18 and the default scale is 0.
The FLOAT ( p ) data type is a synonym for REAL or DOUBLE, depending on the value of p. For SQL Anywhere, the cutoff is platform-dependent, but on all platforms the cutoff value is greater than 15.
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|