The scale of a numeric column or parameter refers to the maximum number of
digits to the right of the decimal point. Note that, for approximate floating
point number columns or parameters, the scale is undefined, since the number
of digits to the right of the decimal place is not fixed. The following table
defines the scale for each SQL data type.
fSqlType |
Scale |
---|---|
SQL_CHAR SQL_VARCHAR SQL_LONGVARCHAR SQL_CLOB | Not applicable. |
SQL_DECIMAL SQL_NUMERIC | The defined number of digits to the right of the decimal place. For example, the scale of a column defined as NUMERIC(10, 3) is 3. |
SQL_SMALLINT SQL_INTEGER | 0 |
SQL_REAL SQL_FLOAT SQL_DOUBLE |
Not applicable. |
SQL_BINARY SQL_VARBINARY SQL_LONGVARBINARY SQL_BLOB |
Not applicable. |
SQL_DATE SQL_TIME |
Not applicable. |
SQL_TIMESTAMP | The number of digits to the right of the decimal point in the "yyyy-mm-dd hh:mm:ss[fff[fff]]" format. For example, if the TIMESTAMP data type uses the "yyyy-mm-dd hh:mm:ss.fff" format, the scale is 3. |
SQL_GRAPHIC SQL_VARGRAPHIC SQL_LONGVARGRAPHIC SQL_DBCLOB |
Not applicable. |