Altering character columns

You can use the MODIFY clause to change the declared length of an existing CHAR, LVARCHAR, NCHAR, NVARCHAR, or VARCHAR column.

Similarly, the MODIFY clause can change the data type of a character column to a non-character data type.

For modified columns that you declare as built-in character data types, explicit or default size specifications are interpreted in units of bytes, unless the database was created with the SQL_LOGICAL_CHAR configuration parameter set to enable logical character semantics in character type declarations. For more information about logical character semantics when the ALTER TABLE statement declares size specifications for character columns, see Logical Character Support in Character Columns. For more information about the SQL_LOGICAL_CHAR configuration parameter, see your Informix® Administrator's Reference. For additional information about multibyte locales and logical characters, see the Informix® GLS User's Guide.

In a database that was created as NLSCASE INSENSITIVE, changing a character column of type NCHAR or NVARCHAR into type CHAR, LVARCHAR, or VARCHAR causes the database server to process values in the modified column as case-sensitive.

Conversely, in the same case-insensitive database, changing a character column of type CHAR, LVARCHAR, or VARCHAR into type NCHAR or NVARCHAR results in case-insensitive processing of values in the modified column. (The data values are not changed, but variations in letter case are ignored in comparison and collation operations on those values.)