SQL Dialects Reference/Data structure definition/Data types/Character types
From Wikibooks, open books for an open world
Character types [edit]
This page includes comparison tables which can be big and complex.
While it's perfectly all right to view them in their complete state, it is recommended to install a comparison tables extension that would allow to select particular columns of interest for comparison.
| SQL version | Feature | Standard | DB2 | Firebird | Ingres | Linter | MSSQL | MySQL | MonetDB | Oracle | PostgreSQL | SQLite | Virtuoso |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ? | Variable-length with limit | ? | VARCHAR(n) | VARCHAR(n) | VARCHAR(n) NVARCHAR(n) |
VARCHAR(n) NVARCHAR(n) |
VARCHAR(n) NVARCHAR(n) |
VARCHAR(n) | VARCHAR(n) CHARACTER VARYING(n) |
VARCHAR2(n) VARCHAR(n) is slated for deprecation |
character varying(n) varchar(n) |
VARCHAR(n) | VARCHAR(n) |
| ? | Variable-length with limit, max size | ? | ? | 32765 | ? | ? | 8000 | 65535 | about ? MB | ? | about 1 GB | ? | ? |
| ? | Fixed-length, blank padded string | ? | CHAR(n) | CHAR(n) | CHAR(n) NCHAR(n) |
CHAR(n) NCHAR(n) |
CHAR(n) NCHAR(n) |
CHAR(n) | ? | CHAR(n) | character(n) char(n) |
CHAR(n) | CHAR(n) |
| ? | Fixed-length, blank padded string, max size | ? | ? | 32767 | ? | ? | 8000 | 255 | ? | ? | about 1 GB | ? | ? |
Notes:
The