代码改变世界

【转载】Vertica data types

2014-06-10 22:15  AlfredZhao  阅读(1685)  评论(0编辑  收藏  举报

原文地址:http://www.quizld.com/2012/11/vertica-datatypes/

This article contains the overview of Vertica Data Types and detailed examples. Vertica Systems helps you monetize all of your data in real-time and at massive scale with the Vertica Analytics Platform.

Vertica Data Types Length (Range) Description
BINARY DATA TYPES    
 BINARY  1 to 65000 Fixed-length binary string
 VARBINARY  1 to 65000 Variable-length binary string
 BYTEA  1 to 65000  Variable-length binary string (synonym for VARBINARY)
 RAW  1 to 65000 Variable-length binary string (synonym for VARBINARY)
BOOLEAN DATA TYPES          
 BOOLEAN  1  True or False or NULL
CHARACTER DATA TYPES    
 CHAR 1 to 65000  Fixed-length character string
 VARCHAR  1 to 65000  Variable-length character string
DATE/TIME DATA TYPES          
 DATE 8 Represents a month, day, and year
 DATETIME 8 Represents a date and time with or without timezone (synonym for TIMESTAMP)
 SMALLDATETIME  8 Represents a date and time with or without timezone (synonym for TIMESTAMP)
 TIME  8 Represents a time of day without timezone
 TIME WITH TIMEZONE 8 Represents a time of day with timezone
 TIMESTAMP 8 Represents a date and time without timezone
 TIMESTAMP WITH TIMEZONE 8 Represents a date and time with timezone
 INTERVAL 8 Measures the difference between two points in time
APPROXIMATE NUMERIC DATA TYPES    
 DOUBLE PRECISION  8 Signed 64-bit IEEE floating point number, requiring 8 bytes of storage
 FLOAT  8 Signed 64-bit IEEE floating point number, requiring 8 bytes of storage
 FLOAT(n)  8 Signed 64-bit IEEE floating point number, requiring 8 bytes of storage
 FLOAT8  8 Signed 64-bit IEEE floating point number, requiring 8 bytes of storage
 REAL  8 Signed 64-bit IEEE floating point number, requiring 8 bytes of storage
EXACT NUMERIC DATA TYPES    
 INTEGER  8 Signed 64-bit integer, requiring 8 bytes NULLS FIRST of storage
 INT  8 Signed 64-bit integer, requiring 8 bytes NULLS FIRST of storage
 BIGINT  8 Signed 64-bit integer, requiring 8 bytes NULLS FIRST of storage
 INT8  8 Signed 64-bit integer, requiring 8 bytes NULLS FIRST of storage
 SMALLINT  8 Signed 64-bit integer, requiring 8 bytes NULLS FIRST of storage
 TINYINT  8 Signed 64-bit integer, requiring 8 bytes NULLS FIRST of storage
 DECIMAL  8+ 8 bytes for the first 18 digits of precision, plus 8 bytes for each additional 19 digits
 NUMERIC  8+ 8 bytes for the first 18 digits of precision, plus 8 bytes for each additional 19 digits
 NUMBER  8+ 8 bytes for the first 18 digits of precision, plus 8 bytes for each additional 19 digits
 MONEY  8+ 8 bytes for the first 18 digits of precision, plus 8 bytes for each additional 19 digits