The following rules apply when inserting or updating values into table columns with INSERT, MERGE or UPDATE:
Atomic values and multiple values with the dimension 1 can be entered in atomic columns and in multiple columns (or subareas) with the dimension 1.
Multiple values with a dimension greater than 1 can be entered in multiple columns (or subareas) with the same dimension.
Additional data-type-specific rules, which depend on the data type involved, also apply. These are described below.
Strings
You can enter an alphanumeric value in a column with an alphanumeric data type or a national value in a column with a national data type. The following rules apply:
If the target data type is CHAR or NCHAR and the length of the value is smaller than the length of the target data type, the value is padded on the right with blanks.
If the target data type is CHAR or NCHAR and the length of the value is greater than the length of the target data type, the value is truncated from the right to the length of the target data type. If characters are removed that are not blanks, the value is not entered and an error message is issued.
If the target data type is VARCHAR or NVARCHAR and the length of the value is greater than the maximum length of the target data type, the value is truncated from the right to the maximum length of the target data type. If characters are removed that are not blanks, the value is not entered and an error message is issued.
Numeric values
You can enter a numeric value in a column with a numeric data type. If the numeric data types are not the same, the value is converted to the data type of the column. The following rules apply:
If the number of digits to the right of the decimal point of the value is too large for the data type of the column, the value is rounded.
If the value is too large for the data type of the column, the value is not entered and an error message is issued.
Time values
You can only enter a time value in a column with the same data type:
a date in a DATE column
a time in a TIME column
a time stamp in a TIMESTAMP column