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 set up to the database's page size in length. In contrast, Microsoft SQL Server's NVARACHAR datatype stores Unicode character strings. |
TIMESTAMP | ROWVERSION | A unique number within a database that is updated whenever a row is updated. |
SMALLDATETIME | SMALLDATETIME | Holds date and time data within the range of 1900-01-01 00:00 through 2079-12-31 23:59. Unlike Microsoft SQL Server, Sybase cannot hold dates with second resolution in a SMALLDATETIME. |
N/A | SQL_VARIANT | Sybase has no weakly typed storage type like SQL Server's SQL_VARIANT. |
UNICHAR | NCHAR(N) | Stores fixed-length, Unicode character strings up to the database's page size in length. |
N/A | UNIQUEIDENTIFIER | Represents a value that is unique across all databases and all servers. |
UNIVARCHAR | NCHAR(N) | Stores variable-length, Unicode character strings up to the database's page size in length. |
VARBINARY(N) | VARBINARY(N) | Describes a variable-length binary value up to 255 bytes in size. In contrast, Microsoft SQL Server can store up to 8,000 bytes. |
VARCHAR(N) | VARCHAR(N) | Holds fixed-length character data up to the database's page size in length. |