3. Understanding SQL Data Types
 
Share this page                  
Understanding SQL Data Types
SQL Data Types
The following table lists the SQL data types:
Class
Category
Data Type
Character
Fixed length
c
 
 
char (character)
 
Varying length
text
 
 
varchar (character varying)
 
 
long varchar (clob, character large object, char large object)
Unicode
Fixed length
nchar
 
Varying length
nvarchar
 
 
long nvarchar (nclob, nchar large object, national character large object)
Numeric
Exact numeric
integer (integer4)
 
 
smallint (integer2)
 
 
bigint (integer8)
 
 
tinyint (integer1)
 
 
decimal
 
Approximate numeric
float (float8, double precision)
float4 (real)
Date/time
Date
date
 
 
ansidate
 
 
ingresdate
 
Time
time (time without time zone)
time with time zone
time with local time zone
 
Timestamp
timestamp (timestamp without time zone)
timestamp with time zone
timestamp with local time zone
 
Interval
interval year to month
interval day to second
Abstract
(none)
money
 
Logical key
object_key
table_key
 
IP network address
ipv4
ipv6
Binary
 
byte (binary)
 
 
varbyte (varbinary)
 
 
long byte (blob, binary large object)
Boolean
Logical
boolean
Spatial
 
See the Geospatial User Guide.