User Documentation
Ispirer Capabilities - MySQL Migration
Pricing
MySQL Data Types - NVARCHAR
Versions: MySQL 5.x, 4.x and 3.23
| MySQL - NVARCHAR | |
|---|---|
| Syntax | NVARCHAR(n) |
| Data | Variable-length character data in the predefined character set - UTF8 |
| Parameters | n is the maximum number of characters, optional |
| Range | 1 ⇐ n ⇐ 21845 (65535 bytes is the maximum row size shared among all columns) |
| Default | n is mandatory |
| Trailing Spaces | Not removed when the value is stored and retrieved. But trailing spaces are insignificant in comparisons, primary and unique keys |
| Error Handling | Exceeding data truncated and a warning is generated if strict SQL mode is not enabled, otherwise in case of non-space characters truncation, an error is raised |
| Storage Size | Actual entry length |
| Synonyms | NATIONAL VARCHAR, NATIONAL CHAR VARYING, NATIONAL CHARACTER VARYING |
| Standards | ANSI SQL |
MySQL NVARCHAR - Equivalents in Other Databases
| Database | Data Type and Conversion |
|---|---|
| Oracle | NVARCHAR2(n), 1 ⇐ n ⇐ 4000/charsize, Unicode - UTF-8 or UTF-16 |
| SQL Server | NVARCHAR(n | max), 1 ⇐ n ⇐ 8000, 2G if max is specified, Unicode - UCS-2 |
| PostgreSQL | VARCHAR(n), 1 ⇐ n ⇐ 1G |
| Sybase ASE | NVARCHAR(n), 1 ⇐ n ⇐ pagesize/@@ncharsize (page size is 2K, 4K, 8K or 16K); UNIVARCHAR(n), 1 ⇐ n ⇐ pagesize/@@unicharsize, Unicode |
| Informix | NVARCHAR(n,r), 1 ⇐ n ⇐ 255, LVARCHAR(n), 1 ⇐ n ⇐ 32739 |
| HP Neoview | NVARCHAR(n), 1 ⇐ n ⇐ (32708 - size of other columns) |
| Ingres | NVARCHAR(n), 1 ⇐ n ⇐ 16000, Unicode - UTF-8 |
Related Data Types in MySQL
| Data Types | ||||
|---|---|---|---|---|
| Fixed-length character data | CHAR(n) | NCHAR(n) | ||
| Variable-length character data | VARCHAR(n) | TINYTEXT | TEXT | MEDIUMTEXT |
| Character large objects | LONGTEXT | |||
All Data Types