Data types
The smallest unit of data that can be manipulated in SQL is called a value.
How values are interpreted depends on the attributes of their source, which includes the data type, length, precision, scale, and CCSID. The sources of values are:
- Columns
- Constants
- Expressions
- Functions
- Special registers
- Variables (such as host variables, SQL variables, global variables, parameter markers and parameters of routines)
The DB2® relational database products support both built-in data types and user-defined data types. This section describes the built-in data types. For a description of distinct types, see User-defined types.
The following figure illustrates the various built-in data types supported by Db2® for i.
For information about specifying the data types of columns, see CREATE TABLE.