4. Understanding the Elements of SQL Statements : SQL Operations : Assignment Operations : String Truncation
 
Share this page                  
String Truncation
If an attempt is made to insert a string value into a table column that is too short to contain the value, the string is truncated.
String truncation can occur as a result of the following statements:
COPY
CREATE TABLE...SELECT
INSERT
UPDATE
Specify Error Handling for String Truncation
To specify error handling for string truncation, use any of these methods:
Set the ‑STRING_TRUNCATION=option flag:
On the CONNECT statement (specified when a session connects to a database) or
On the command line for Ingres operating system commands that accept SQL option flags.
Issue the SET STRING_TRUNCATION option (see page String_truncation) statement.
The option can be one of the following:
IGNORE
(Default) Truncates and inserts the string without issuing a message.
WARN
Truncates and inserts the string and issues a warning.
FAIL
Aborts the statement and issues an error.