SQL character type for Unicode/UTF-8
This section explains database server specifics regarding Unicode / UTF-8 support with character string SQL types.
All database servers can store UNICODE data in character strings types, but there are some
specifics you must be aware of. Genero BDL programs typically use the CHAR
and VARCHAR
types to store UTF-8 strings. But the corresponding SQL type may
have a different name, depending on the database server type. Use the correct SQL type when
creating your database tables. When the database uses a different UNICODE codeset as UTF-8 to
store the character string data, the database client or the Genero database driver take care
of the codeset conversion, as long as the runtime system and database client locale are
properly defined.
Database Server Type | Char types to be used for Unicode/UTF-8 |
---|---|
IBM® DB2® LUW | CHAR /
VARCHAR if the database was created with UTF-8 codeset. Otherwise, you must use
GRAPHIC , VARGRAPHIC types.For more details, see the topic about character data type usage with IBM DB2. |
IBM Informix® | CHAR /
VARCHAR , the database must be created with UTF-8 locale. |
IBM Netezza | NCHAR /
NVARCHAR (data always stored in UTF-8).For more details, see the topic about character data type usage with IBM Netezza. |
Microsoft™ SQL Server | NCHAR / NVARCHAR , to store UTF-16 data
(drivers make the conversion for application codeset UTF-8)The For more details, see the topic about character data type usage with Microsoft SQL Server. |
Oracle® MySQL | CHAR /
VARCHAR if the database locale is UTF-8.
For more details, see the topic about character data type usage with Oracle MySQL. |
Oracle Database Server | CHAR /
VARCHAR2 if the database locale is UTF-8.
For more details, see the topic about character data type usage with Oracle DB. |
PostgreSQL |
For more details, see the topic about character data type usage with PostgreSQL. |
SAP HANA® |
For more details, see the topic about character data type usage with SAP HANA. |
SQLite |
For more details, see the topic about character data type usage with SQLite. |