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.
Important: 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.
Table 1. Character data type differences by database engine brands
Database Server Type Character types topic
IBM® DB2® LUW (UNIX™) 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