MONEY data type

When you define a column with the MONEY(p) data type, it has a total of p (<= 32) significant digits (the precision) and a scale of 2 digits.

The default value that the database server uses for scale is locale-dependent. The default locale specifies a default scale of two. For nondefault locales, if the scale is omitted from the declaration, the database server creates MONEY values with a locale-specific scale. For more information, see the Informix® GLS User's Guide.

You can also specify a scale with the MONEY(p,s) syntax, where s represents the scale. For a complete description of the MONEY data type, see the Informix Guide to SQL: Reference.
Tip: The internal format of the MONEY data type is often referred to as its binary representation.

The DataBlade® API supports the SQL MONEY data type with the mi_money data type. The mi_money data type holds the internal (binary) format of a MONEY value. This binary representation of the MONEY data type has the same structure as the fixed-point DECIMAL data type.

Values of the mi_money data type cannot fit into an MI_DATUM structure. They must be passed by reference within C UDRs.

All data types, including mi_money, must be passed by reference within client LIBMI applications.