Oracle® Database
Oracle® Database
2
Tools Support 1-3
2 Basic Elements of Oracle SQL
Data Types 2-1
Oracle Built-in Data Types 2-5
Character Data Types 2-8
Numeric Data Types 2-12
LONG Data Type 2-16
Datetime and Interval Data Types 2-18
RAW and LONG RAW Data Types 2-26
Large Object (LOB) Data Types 2-27
JSON Data Type 2-30
Extended Data Types 2-30
Rowid Data Types 2-32
ROWID Data Type 2-32
iii
UROWID Data Type 2-32
ANSI, DB2, and SQL/DS Data Types 2-33
User-Defined Types 2-34
Object Types 2-35
REF Data Types 2-35
Varrays 2-35
Nested Tables 2-35
Oracle-Supplied Types 2-36
Any Types 2-36
ANYTYPE 2-36
ANYDATA 2-36
ANYDATASET 2-37
XML Types 2-37
XMLType 2-37
URI Data Types 2-38
URIFactory Package 2-39
Spatial Types 2-39
SDO_GEOMETRY 2-39
SDO_TOPO_GEOMETRY 2-39
SDO_GEORASTER 2-40
Data Type Comparison Rules 2-40
Numeric Values 2-40
Datetime Values 2-40
Binary Values 2-41
Character Values 2-41
Object Values 2-44
Varrays and Nested Tables 2-44
Data Type Precedence 2-44
Data Conversion 2-45
Implicit and Explicit Data Conversion 2-45
Implicit Data Conversion 2-45
Implicit Data Conversion Examples 2-48
Explicit Data Conversion 2-48
Security Considerations for Data Conversion 2-50
Literals 2-51
Text Literals 2-51
Numeric Literals 2-53
Integer Literals 2-53
3
NUMBER and Floating-Point Literals 2-54
Datetime Literals 2-56
Interval Literals 2-59
INTERVAL YEAR TO MONTH 2-60