Database Reference
In-Depth Information
Table 6.1 Hive Data Types
Type
Description
Examples
SQL Server
Equivalent
String enclosed by single or
double quotation marks.
STRING
'John Smith' or
"John Smith"
varchar(n),
nvarchar(n)
1-byte signed integer in the
range of -128 to 127.
TINYINT
10
tinyint
SMALLINT 2-byte signed integer in the
range of -32,768 to 32,767.
32000
smallint
4-byte signed integer in the
range of -2,147,483,648 to
2,147,483,647.
INT
2000000
int
8-byte signed integer in the
range of
-9,223,372,036,854,775,808
to
9,223,372,036,854,775,807.
BIGINT
20000000
bigint
Boolean true or false.
BOOLEAN
TRUE
FALSE
bit
4-byte single-precision
floating point.
FLOAT
25.189764
real
8-byte double-precision
floating point.
DOUBLE
25.1897645126
float(53)
A 38-digit precision
number.
DECIMAL
25.1897654
decimal,
numeric
TIMESTAMP UNIX timestamp that can
be in one of three forms:
Integer: Represents the
number of seconds from the
UNIX epoch date and time
(January 1, 1970 12:00 AM).
Floating point: Represents
second offset from UNIX
epoch with nanosecond
123412123
123412123.1234567
'2013-01-01
12:00:00'
datetime2
datetime2(7)
 
Search WWH ::




Custom Search