Ispirer Ispirer
 


Ispirer Home Page Ispirer SQLWays Product Page - Migration to Sybase Request SQLWays

Sybase ASA Data Types


This article describes the data types supported by Sybase Adaptive Server Anywhere (ASA), Sybase SQL Anywhere 11.0.x and earlier.

Overview

Data Type Parameters and Range
Character Data Types
CHAR(n) - Variable-length character data 1 ⇐ n ⇐ 32767/charsize, default is 1
NCHAR(n) - Variable-length character data in UTF8 1 ⇐ n ⇐ 8191, default is 1

Character Data Types

CHAR

Sybase ASA - CHAR
Syntax CHAR[(n [CHAR|CHARACTER])]
Data Variable-length character data, single-byte and multibyte character sets
Parameters n is the maximum number of bytes if CHAR/CHARACTER is not specified or characters if CHAR/CHARACTER is specified, optional
Range 1 ⇐ n ⇐ 32767/charsize
Default n is 1
Padding CHAR values are not right-padded with spaces to n
Storage Size n bytes
Synonyms CHARACTER
Standards ANSI SQL

Sybase ASA 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
PostgreSQL CHAR(n), 1 ⇐ n ⇐ 1G
Sybase ASE CHAR(n), 1 ⇐ n ⇐ pagesize (2K, 4K, 8K or 16K)
Informix DS CHAR(n), 1 ⇐ n ⇐ 32767
Teradata CHAR(n), 1 ⇐ n ⇐ 64000/charsize
HP Neoview CHAR(n), 1 ⇐ n ⇐ 4036
Interbase/Firebird CHAR(n), 1 ⇐ n ⇐ 32767/charsize
Ingres CHAR(n), 1 ⇐ n ⇐ 3200

NCHAR

Sybase ASA - NCHAR
Syntax CHAR[(n)]
Data Variable-length character data in Unicode - UTF-8
Parameters n is the maximum number of characters, optional
Range 1 ⇐ n ⇐ 8191
Default n is 1
Padding NCHAR values are not right-padded with spaces to n
Storage Size n bytes
Synonyms NATIONAL CHAR or NATIONAL CHARACTER
Standards ANSI SQL

Sybase ASA NCHAR - Equivalents in Other Databases

Database Data Type and Conversion
Oracle NCHAR(n), 1 ⇐ n ⇐ 2000/charsize, Unicode - UTF-8 or UTF-16
SQL Server NCHAR(n), 1 ⇐ n ⇐ 4000, Unicode - UCS-2
IBM DB2 GRAPHIC(n), 1 ⇐ n ⇐ 127, double-byte
MySQL NCHAR(n), 0 ⇐ n ⇐ 255, Unicode - UTF-8 and TEXT or VARCHAR(n), if n > 255
PostgreSQL CHAR(n), 1 ⇐ n ⇐ 1G
Sybase ASE NCHAR(n), 1 ⇐ n ⇐ pagesize (2K, 4K, 8K or 16K); UNICHAR(n), 1 ⇐ n ⇐ pagesize, Unicode
Informix DS NCHAR(n), 1 ⇐ n ⇐ 32767, database character set
Teradata CHAR(n), 1 ⇐ n ⇐ 64000/charsize
HP Neoview NCHAR(n), 1 ⇐ n ⇐ 4036, Unicode - UCS-2 or ISO88591 (Latin1)
Interbase/Firebird NCHAR(n), 1 ⇐ n ⇐ 32767, single-byte ISO8859_1 (Latin 1); CHAR(n), 1 ⇐ n ⇐ 32767, with CHARACTER SET UTF-8
Ingres NCHAR(n), 1 ⇐ n ⇐ 16000, Unicode - UTF-8

Data Types in Other Databases



Ispirer Home Page Ispirer SQLWays Product Page - Migration to Sybase Request SQLWays

sqlways/sybase/asa-data-types.txt · Last modified: May 07, 2018, 03:15:34 PM (external edit)
 
© 1999-2018, Ispirer Systems Ltd.
All Rights Reserved.  Privacy Statement