User Documentation
Ispirer Capabilities - Oracle Migration
Pricing
Oracle Data Types - VARCHAR2
Versions: Oracle 11g, 10g, 9i, 8i and 7.3
Oracle - VARCHAR2 | |
---|---|
Syntax | VARCHAR2(n [CHAR | BYTE]) |
Data | Variable-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 |
Range | 1 ⇐ n ⇐ 4000/charsize |
Default | n is mandatory |
Padding | Not right-padded with spaces to n |
Trailing Spaces | Not removed when the value is stored and retrieved |
Character Set | Database default |
Empty String | '' is treated as NULL |
Error Handling | Error is raised if the value is too long |
Storage Size | Actual entry length |
Synonyms | VARCHAR, CHAR VARYING, CHARACTER VARYING |
Version Differences | Oracle 9i - CHAR and BYTE qualifiers added |
Standards | Oracle Extension |
Oracle VARCHAR2 - Equivalents in Other Databases
Database | Data Type and Conversion |
---|---|
SQL Server | VARCHAR(n | max), 1 ⇐ n ⇐ 8000, 2G if max is specified |
MySQL | VARCHAR(n), 1 ⇐ n ⇐ 65535/charsize |
PostgreSQL | VARCHAR(n), 1 ⇐ n ⇐ 1G |
Sybase ASE | VARCHAR(n), 1 ⇐ n ⇐ pagesize (2K, 4K, 8K or 16K) |
Informix | VARCHAR(n,r), 1 ⇐ n ⇐ 255, LVARCHAR(n), 1 ⇐ n ⇐ 32739 |
HP Neoview | VARCHAR(n), 1 ⇐ n ⇐ (32708 - size of other columns) |
Ingres | VARCHAR(n), 1 ⇐ n ⇐ 32000 |
Related Data Types in Oracle
Data Types | |||
---|---|---|---|
Fixed-length Character Data | CHAR(n) | NCHAR(n) | |
Variable-length Character Data | NVARCHAR2(n) | ||
Character Large Objects | CLOB | NCLOB | LONG |
All Data Types