The LVARCHAR data type
The LVARCHAR data type can store character strings of up to 32,739 bytes in a variable-length field. If you specify no maximum size in its declaration, the default upper size limit is 2048 bytes. Data values can include letters, numbers, symbols, white space, and unprintable characters.
LVARCHAR is like the VARCHAR data type in several ways:
- Strings of the LVARCHAR data type are collated in code-set order.
- Client applications perform code-set conversion on LVARCHAR data.
- LVARCHAR supports the built-in SQL length functions. (See SQL length functions.)
- LVARCHAR data type declarations can specify a maximum size.
Unlike VARCHAR, however, LVARCHAR has no reserved size parameter, and data strings in LVARCHAR columns can be longer than the VARCHAR limit of 255 bytes.
The database server also uses LVARCHAR to represent the external format of opaque data types. In I/O operations of the database server, LVARCHAR data values have no upper limit on their size, apart from file size restrictions or limits of your operating system or hardware resources.