All three products permit CHAR and VARCHAR data, but each product treats these types differently.
SQL Anywhere treats all strings as VARCHAR, even in a blank-padded database.
Adaptive Server Enterprise and Sybase IQ differentiate between CHAR (fixed-length) and VARCHAR (variable-length) data.
Adaptive Server Enterprise trims trailing blank spaces from VARCHAR values. Sybase IQ trims trailing blanks from VARCHAR values depending on the form of the data and the operation. See Character data types in Chapter 3, “SQL Data Types.”
When inserting into CHAR or VARCHAR:
SQL Anywhere permits inserting integral data types into CHAR or VARCHAR (implicit conversion).
Adaptive Server Enterprise and Sybase 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.
SQL Anywhere supports up to 32K-1 with CHAR and VARCHAR, and up to 2GB with LONG VARCHAR.
SQL Anywhere supports the name LONG VARCHAR and its synonym TEXT, while Adaptive Server Enterprise supports only the name TEXT, not the name LONG VARCHAR.
Sybase IQ supports CHAR and VARCHAR up to 32K-1 bytes.
Sybase 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.
SQL Anywhere and Sybase 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.