CHAR and VARCHAR types

Using the CHAR and VARCHAR data types with different databases.

The CHAR and VARCHAR types are designed to store character strings, but all database servers do not have the same semantics for these types.

The maximum size, supported characters sets and length semantics of CHAR and VARCHAR types can be very different from one database system to another. Consider using character types and sizes that are common across all the database systems you target.

Important:

Most database engine brands allow to create table columns using a different character encoding than the database. This is not supported with Genero: All table columns must use the same character encoding defined at the database level.

Table 1. Character data type differences by database engine brands
Database Server Type Character types topic
IBM® DB2® LUW CHAR/VARCHAR in IBM DB2
IBM Informix® CHAR/VARCHAR in IBM Informix
IBM Netezza® CHAR/VARCHAR in IBM Netezza
Microsoft™ SQL Server CHAR/VARCHAR in SQL Server
Oracle® MySQL / MariadDB CHAR/VARCHAR in Oracle MySQL
Oracle Database Server CHAR/VARCHAR in Oracle DB
PostgreSQL CHAR/VARCHAR in PostgreSQL
SAP HANA® CHAR/VARCHAR in SAP HANA
SQLite CHAR/VARCHAR in SQLite