SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-152
Considerations for INSERT
value is longer than the column length, string truncation of nonblank trailing characters
returns an error, and the truncated string is not inserted.
For variable length, a shorter inserted value is not padded. As is the case for fixed
length, if the value is longer than the column length, string truncation of nonblank
trailing characters returns an error, and the truncated string is not inserted.
Inserting Numeric Values
Any numeric data type is compatible with all other numeric data types. If you insert a
value into a numeric column that is not large enough, an overflow error occurs. If a
value has more digits to the right of the decimal point than specified by the scale for
the column definition, the value is truncated.
Inserting Interval Values
A value of INTERVAL data type is compatible with another value of INTERVAL data
type only if the two data types are either both year-month or both day-time intervals.
Inserting Date and Time Values
DATE, TIME, and TIMESTAMP are the three SQL/MX datetime data types. A value
with a datetime data type is compatible with another value with a datetime data type
only if the values have the same datetime fields.
Inserting Nulls
In addition to inserting values with specific data types, you might want to insert nulls.
To insert null, use the keyword NULL.
Audited and Nonaudited Tables
SQL/MX tables must be audited. You can run NonStop SQL/MX against nonaudited
SQL/MP tables.
The TMF product works only on audited tables, so a transaction does not protect
operations on nonaudited tables. Nonaudited tables follow a different locking and error
handling model than audited tables. Certain situations such as DML error occurrences
or utility operations with DML operations can lead to inconsistent data within a
nonaudited table or between a nonaudited table and its indices.
To avoid problems, do not run DDL or utility operations concurrently with DML
operations on nonaudited tables. When you try to delete data in a nonaudited table
with an index, NonStop SQL/MX returns an error.