SnowConvert AI - Sybase IQ - Data Types

Snowflake supports most basic SQL data types (with some restrictions) for columns, local variables, expressions, parameters, and other appropriate/suitable locations.

Exact and approximate numerics

SybaseSnowflakeNotes
SybaseSnowflakeNotes
BIGINTBIGINT

​Note that BIGINT in Snowflake is an alias for NUMBER(38,0)

[See note on this conversion below.]

BITBOOLEANSybase only accepts ​1, 0, or NULL
DECIMALDECIMAL​Snowflake’s DECIMAL is synonymous with NUMBER
FLOATFLOAT

​This data type behaves equally on both systems.

Precision 7-15 digits, float (1-24)

Storage 4 - 8 bytes, float (25-53)

INTINT

Note that INT in Snowflake is an alias for NUMBER(38,0)

[See note on this conversion below.]

SMALLINTSMALLINT​​This data type behaves equally
TINYINT​TINYINT

Note that TINYINT in Snowflake is an alias for NUMBER(38,0)

[See note on this conversion below.]

NUMERICNUMERIC​Snowflake’s NUMERIC is synonymous with NUMBER

NOTE:

  • Each is converted to the alias in Snowflake with the same name for the conversion of integer data types (INT, SMALLINT, BIGINT, TINYINT). Each of those aliases is converted to NUMBER(38,0), a data type considerably larger than the integer datatype. Below is a comparison of the range of values that can be present in each data type:
    • Snowflake NUMBER(38,0): -99999999999999999999999999999999999999 to +99999999999999999999999999999999999999
    • Sybase TINYINT: 0 to 255
    • Sybase INT: -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)
    • Sybase BIGINT: -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)
    • Sybase SMALLINT: -2^15 (-32,768) to 2^15-1 (32,767)

Date and time

SybaseSnowflakeNotes
DATEDATESybase accepts range from 0001-01-01 to 9999-12-31
DATETIMETIMESTAMP_NTZ(3)Snowflake’s DATETIME is an alias for TIMESTAMP_NTZ​
SMALLDATETIMETIMESTAMP_NTZ

Snowflake’s DATETIME truncates the TIME information

That is, 1955-12-13 12:43:10 is saved as 1955-12-13

TIMETIME

​This data type behaves equally on both systems.

Range 00:00:00.0000000 through 23:59:59.9999999

TIMESTAMPTIMESTAMP

Character strings

SybaseSnowflakeNotes
CHARCHAR​Snowflake’s max string size in bytes is 167772161.
TEXT​TEXT
VARCHAR​VARCHARSnowflake’s max string size in bytes is 167772161.

Unicode character strings

SybaseSnowflakeNotes
NCHARNCHARSynonymous with VARCHAR except default length is VARCHAR(1).
NTEXTTEXTNTEXT is a Sybase domain type, implemented as a LONG NVARCHAR.
NVARCHARVARCHARSnowflake’s max string size in bytes is 167772161.

Binary strings

SybaseSnowflakeNotes
BINARY​BINARYIn Snowflake the maximum length is 8 MB (8,388,608 bytes) and length is always measured in terms of bytes.
VARBINARYVARBINARY

Snowflake uses this data type as a synonym for BINARY.

Snowflake often represents each byte as 2 hexadecimal characters