Database Reference
In-Depth Information
Date and Time
Data Types
Description
Datetimeoffset
10-byte fixed-length default with 100 nanosecond precision (.0000000).
Uses 24 hour clock, based on Coordinated Universal Time (UTC).
UTC is a refinement of Greenwich Mean Time (GMT), based on the prime
meridian at Greenwich, England, which defines when midnight
(00:00:00.0000000) occurs. Offset is the time zone difference from the
Greenwich time zone. Default format is YYYY-MM-DD
HH:MM:SS.NNNNNNN (+|−)HH:MM. Range is from January 1,
1 00:00:00.0000000 AM (0001-01-01 00:00:00.0000000) through
December 31, 9999 23:59.59.9999999 PM (9999-12-31 23:59.59.9999999)
with an offset of 14:59 to +14:59 . Use for 24 hour time.
Timestamp
See documentation.
String Data Types
Description
Char (n)
n-byte fixed-length string data (non-Unicode). Range of n is from 1
through 8000 .
Varchar (n | max)
n-byte variable-length string data (non-Unicode). Range of n is from 1
through 8000 . Max creates a maximum 2 (31−1) bytes (2 GBytes).
Text
Use VARCHAR(max). See documentation.
Nchar (n)
(n x 2)-byte fixed-length Unicode string data. Range of n is from 1
through 4000.
Nvarchar (n | max)
(n x 2)-byte variable-length Unicode string data. Range of n is from 1
through 4000 . Max creates a maximum 2 (31−1) bytes (2 GBytes).
Ntext
Use NVARCHAR(max). See documentation.
Binary (n)
n-byte fixed-length binary data. Range of n is from 1 through 8000 .
Other Data Types
Description
Varbinary (n | max)
Variable-length binary data. Range of n is from 1 through 8000 . Max
creates a maximum 2 (31−1) bytes (2 GBytes).
Image
Use VARBINARY(max). See documentation.
Uniqueidentifier
16-byte Globally Unique Identifier (GUID). See documentation.
hierarchyid
See documentation.
Cursor
See documentation.
Table
See documentation.
XML
Use for storing XML data. See documentation.
Sql_variant
See documentation.
(b) Common Data Types in Oracle Database 11 g Release 2
Numeric Data Types
Description
SMALLINT
Synonym for INTEGER, implemented as NUMBER(38,0).
INT
Synonym for INTEGER, implemented as NUMBER(38,0).
Figure 7-4
Continued
INTEGER
When specified as a data type, it is implemented as NUMBER(38,0).
Search WWH ::




Custom Search