Ispirer Home Page
Ispirer SQLWays Product Page - Migration to Sybase
Request SQLWays
Sybase ASE Data Types - CHAR
Versions: Sybase Adaptive Server Enterprise 15.x, 12.5.x, 12.0 and 11.x
Sybase ASE - CHAR | |
---|---|
Syntax | CHAR[(n)] |
Data | Fixed-length character data, single-byte and multibyte character sets |
Parameters | n is the maximum number of bytes, optional |
Range | 1 ⇐ n ⇐ pagesize (2K, 4K, 8K or 16K) |
Default | n is 1 |
Padding | Right-padded with spaces to n only if NOT NULL |
Empty String | '' is padded with spaces to n |
Error Handling | Exceeding data truncated without warning if set string_rtruncation off specified (default), otherwise an error is raised |
Storage Size | n bytes |
Internals | If defined as NULL, it is automatically converted to VARCHAR without warning |
Synonyms | CHARACTER |
Standards | ANSI SQL |
Sybase ASE CHAR - Equivalents in Other Databases
Database | Data Type and Conversion |
---|---|
Oracle | CHAR(n), 1 ⇐ n ⇐ 2000/charsize |
SQL Server | CHAR(n), 1 ⇐ n ⇐ 8000 |
IBM DB2 | CHAR(n), 1 ⇐ n ⇐ 254 |
MySQL | CHAR(n), 0 ⇐ n ⇐ 255 and TEXT or VARCHAR(n), if n > 255 |
PostgreSQL | CHAR(n), 1 ⇐ n ⇐ 1G |
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 Sybase ASE
Data Types | |||
---|---|---|---|
Fixed-length character data | NCHAR(n) | UNICHAR(n) | |
Variable-length character data | VARCHAR(n) | NVARCHAR(n) | UNIVARCHAR(n) |
Character large objects | TEXT | UNITEXT |
All Data Types
Oracle | SQL Server | IBM DB2 | MySQL | PostgreSQL | Sybase ASE | Sybase ASA | Informix DS | Teradata | HP Neoview | Interbase/Firebird | Ingres |
Ispirer Home Page
Ispirer SQLWays Product Page - Migration to Sybase
Request SQLWays