Table of ContentsPreviousNext

Ispirer             Ispirer


Ispirer SQLWays Database Migration Software

Microsoft SQL Server and Sybase Data Types Differences

This chapter provides detailed descriptions of the differences in data types used by Microsoft SQL Server and Sybase Adaptive Server databases.

For more information about the data types, see Microsoft SQL Server Data Types and Sybase Data Types

TABLE 88. Data Types Differences
SQL Server Data Type
Sybase Data Type
Description
Conversion
char(n)
1<=n<=8000
char(n)
1<=n<=255
 
 
Fixed-length character data
 
if n>255, SQL Server nchar(n) should be converted to Sybase text
nchar(n)
1<=n<=4000
nchar(n)
1<=n<=255
 
 
Fixed-length character data (Unicode, multibyte sets)
 
if n>255, SQL Server nchar(n) should be converted to Sybase text
 
varchar(n)
1<=n<=8000
varchar(n)
1<=n<=255
Variable-length character data
 
if n>255, SQL Server varchar(n) should be converted to Sybase text
 
nvarchar(n)
1<=n<=4000
nvarchar(n)
1<=n<=255
Variable-length character data (Unicode, multibyte sets)
 
if n>255, SQL Server nvarchar(n) should be converted to Sybase text
 
bigint
-
Integer, 64-bit
SQL Server bigint should be converted to Sybase decimal(19,0)
int
int
Integer, 32-bit
Not required
smallint
smallint
Integer, 16-bit
Not required
tinyint
tinyint
Integer, 8-bit
Not required
datetime
datetime
Date and time
Not required
smalldatetime
smalldatetime
Date and time
Not required
money
money
Monetary data
Not required
smallmoney
smallmoney
Monetary data
Not required
decimal(p,s) 1<=p<=38; 0<=s<=p;
decimal(p,s)
1<=p<= 38; 0<=s<=p;
Fixed-point numeric data
Not required
numeric(p,s)
1<=p<=38; 0<=s<=p;
numeric(p,s)
1<=p<=38; 0<=s<=p;
Fixed-point numeric data
 
Not required
float(n)
1<=n<=53
float(n)
1<=n<=machine dependent
Floating point numeric data
Not required
-
double precision
Floating point numeric data, 64-bit
Sybase double precision should be converted to SQL server float(53)
real
real
Floating point numeric data, 32-bit
Not required
text
text
Variable-length character data, up to 2 Gb
Not required
ntext
-
Variable-length Unicode character data, up to 1 Gb
SQL Server ntext should be converted to Sybase text
binary(n)
1<=n<=8000
binary(n)
1<=n<=255
 
Fixed-length binary data
 
if n>255, SQL Server binary(n) should be converted to Sybase image
 
varbinary(n)
1<=n<=8000
varbinary(n)
1<=n<=255

Variable-length binary data
 
if n>255, SQL Server varbinary(n) should be converted to Sybase image
image
image
Variable-length binary data, up to 2 Gb
Not required
bit
bit
Integer value 0 or 1
SQL Server bit can be NULL, while Sybase bit cannot be NULL
Nullable SQL Server bit should be converted to Sybase tinyint or char(1)
uniqueidentifier
-
Globally unique identifier (GUID)
SQL Server uniqueidentifier should be converted to Sybase char(36)
timestamp
timestamp
Unique number that gets updated every time a row gets updated
Not required


Table of ContentsPreviousNext
Ispirer             Ispirer
Copyright © 1999-2014 Ispirer Systems Ltd. Ispirer and SQLWays are trademarks of Ispirer Systems Ltd. All other product names may be trademarks of the respective companies. All rights reserved.