All three products permit CHAR and VARCHAR data, but each product treats these types differently.
Adaptive Server Anywhere treats all strings as VARCHAR, even in a blank-padded database.
Adaptive Server Enterprise and IQ differentiate between CHAR (fixed-length) and VARCHAR (variable-length) data.
Adaptive Server Enterprise trims trailing blank spaces from VARCHAR values, but IQ does not.
When inserting into CHAR or VARCHAR:
Adaptive Server Anywhere permits inserting integral data types into CHAR or VARCHAR (implicit conversion).
Adaptive Server Enterprise and IQ require explicit conversion.
The maximum size of a column is determined as follows:
Adaptive Server Enterprise CHAR and VARCHAR depend on the logical page size, which can be 2K, 4K, 8K, and 16K. For example:
2K page size allows a column as large as a single row, about 1962 bytes.
4K page size allows a column as large as about 4010 bytes.
Adaptive Server Anywhere supports up to 32K-1 with CHAR and VARCHAR, and up to 2GB with LONG VARCHAR
Anywhere supports the name LONG VARCHAR and its synonym TEXT, while Adaptive Server Enterprise only supports the name TEXT, not the name LONG VARCHAR.
IQ supports CHAR and VARCHAR up to 32K-1 bytes.
IQ also supports up to 512TB (with an IQ page size of 128KB) and 2PB (with an IQ page size of 512KB) with LONG VARCHAR. For information on the LONG VARCHAR data type in Sybase IQ, see Large Objects Management in Sybase IQ.
Adaptive Server Enterprise supports NCHAR, NVARCHAR, UNICHAR, UNIVARCHAR data types. N is for multibyte character sets; UNI is for single-byte character sets.
Adaptive Server Anywhere and IQ support Unicode in the CHAR and VARCHAR data types rather than as a separate data type.
For compatibility between Sybase IQ and Adaptive Server Enterprise, always specify a length for character data types.