User Documentation
Ispirer Capabilities - DB2 Migration
Pricing
IBM DB2 Data Types - CHAR
Versions: IBM DB2 9.x, 8.x, 7.x, 6.1 and 5.2
| DB2 - CHAR | |
|---|---|
| Syntax | CHAR[(n)] [FOR BIT DATA] |
| Data | Fixed-length character data |
| Parameters | n is the maximum number of bytes, optional. If FOR BITA DATA is specified the column data is treated as binary data |
| Range | 1 ⇐ n ⇐ 254 |
| Default | n is 1 |
| Padding | Right-padded with spaces to n |
| Empty String | '' is treated as empty string |
| Storage Size | n bytes |
| Synonyms | CHARACTER |
| Standards | ANSI SQL |
IBM DB2 CHAR - Equivalents in Other Databases
| Database | Data Type and Conversion |
|---|---|
| Oracle | CHAR(n), 1 ⇐ n ⇐ 2000/charsize |
| SQL Server | CHAR(n), 1 ⇐ n ⇐ 8000 |
| MySQL | CHAR(n), 0 ⇐ n ⇐ 255 |
| PostgreSQL | CHAR(n), 1 ⇐ n ⇐ 1G |
| Sybase ASE | CHAR(n), 1 ⇐ n ⇐ pagesize (2K, 4K, 8K or 16K) |
| Sybase ASA | CHAR(n), 1 ⇐ n ⇐ 32767/charsize |
| Informix DS | CHAR(n), 1 ⇐ n ⇐ 32767 |
| Teradata | CHAR(n), 1 ⇐ n ⇐ 64000/charsize |
| HP Neoview | CHAR(n), 1 ⇐ n ⇐ 4036 |
| Interbase/Firebird | CHAR(n), 1 ⇐ n ⇐ 32767/charsize |
| Ingres | CHAR(n), 1 ⇐ n ⇐ 3200 |
All Data Types