User Documentation
Ispirer Capabilities - Oracle Migration
Pricing
Oracle Data Types - CHAR
Versions: Oracle 11g, 10g, 9i, 8i and 7.3
| Oracle - CHAR | |
|---|---|
| Syntax | CHAR[(n [CHAR | BYTE])] |
| Data | Fixed-length character data, single-byte and multibyte character sets |
| Parameters | n is the maximum number of bytes if BYTE is specified (default, defined by NLS_LENGTH_SEMANTICS) or characters if CHAR is specified, optional |
| Range | 1 ⇐ n ⇐ 2000/charsize |
| Default | n is 1 |
| Padding | Right-padded with spaces to n |
| Trailing Spaces | Not removed when the value is retrieved |
| Character Set | Database default |
| Empty String | '' is treated as NULL |
| Error Handling | Error is raised if the value is too long |
| Storage Size | n*charsize bytes |
| Synonyms | CHARACTER |
| Version Differences | Oracle 9i - CHAR and BYTE qualifiers added |
| Standards | ANSI SQL |
Oracle CHAR - Equivalents in Other Databases
| Database | Data Type and Conversion |
|---|---|
| SQL Server | CHAR(n), 1 ⇐ n ⇐ 8000 |
| IBM DB2 | CHAR(n), 1 ⇐ n ⇐ 254 |
| 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 | CHAR(n), 1 ⇐ n ⇐ 32767 |
| Teradata | CHAR(n), 1 ⇐ n ⇐ 64000/charsize |
| HP Neoview | CHAR(n), 1 ⇐ n ⇐ (32708 - size of other columns) |
| Interbase/Firebird | CHAR(n), 1 ⇐ n ⇐ 32767/charsize |
| Ingres | CHAR(n), 1 ⇐ n ⇐ 3200 |
Related Data Types in Oracle
| Data Types | |||
|---|---|---|---|
| Fixed-length Character Data | NCHAR(n) | ||
| Variable-length Character Data | VARCHAR2(n) | NVARCHAR2(n) | |
| Character Large Objects | CLOB | NCLOB | LONG |
All Data Types