Sybase Adaptive Server Datatypes

Table A-1 compares the datatypes supported by Sybase Adaptive Server to those supported by Microsoft SQL Server. While there is significant overlap in the types offered, a few types differ in meaning or are missing on one of the platforms. Where differences in the types exist, they’ll be listed in the table. Types that are not listed within the table should be considered identical on both platforms.

Table A-1. Sybase Adaptive Server datatypes

Sybase adaptive server datatype

Microsoft SQL Server datatype

Notes

N/A

BIGINT

Usage of decimal(19,0) as an equivalent to BIGINT will allow storage of values within the same range.

BINARY

BINARY

Describes a fixed-length binary value up to 255 bytes in size. In contrast, Microsoft SQL Server can store 8,000 bytes.

CHAR(N )

CHAR(N)

Holds fixed-length character data up to the database’s page size in length.

DATETIME

DATETIME

Holds date and time data within the range of 1753-01-01 00:00:00 through 9999-12-31 23:59:59. The DATETIME type can store milliseconds with a granularity of 1/300 second.

NCHAR(N)

N/A

Holds fixed-length character strings in the national character set up to the database’s page size in length. In contrast, Microsoft SQL Server’s NCHAR datatype stores Unicode character strings.

N/A

NTEXT

Holds Unicode text passages up to 1,073,741,823 characters in length.

NVARACHAR(N)

N/A

Holds variable-length character strings in the national character ...

Get SQL in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.