Oracle SQL Types : Introduction « SQL Data Types « Oracle PL/SQL Tutorial

Oracle PL/SQL Tutorial
1. Introduction
2. Query Select
3. Set
4. Insert Update Delete
5. Sequences
6. Table
7. Table Joins
8. View
9. Index
10. SQL Data Types
11. Character String Functions
12. Aggregate Functions
13. Date Timestamp Functions
14. Numerical Math Functions
15. Conversion Functions
16. Analytical Functions
17. Miscellaneous Functions
18. Regular Expressions Functions
19. Statistical Functions
20. Linear Regression Functions
21. PL SQL Data Types
22. PL SQL Statements
23. PL SQL Operators
24. PL SQL Programming
25. Cursor
26. Collections
27. Function Procedure Packages
28. Trigger
29. SQL PLUS Session Environment
30. System Tables Data Dictionary
31. System Packages
32. Object Oriented
33. XML
34. Large Objects
35. Transaction
36. User Privilege
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Oracle PL/SQL Tutorial » SQL Data Types » Introduction 
10. 1. 1. Oracle SQL Types
TypeDescription
CHAR[(length [BYTE | CHAR])]Fixed-length character data of length bytes or characters and padded with trailing spaces. Maximum length is 2,000 bytes.
VARCHAR2(length [BYTE | CHAR])Variable-length character data of up to length bytes or characters. Maximum length is 4,000 bytes.
NCHAR[(length)]Fixed-length Unicode character data of length characters. Number of bytes stored is 2 * length for AL16UTF16 encoding and 3 * length for UTF8. Maximum length is 2,000 bytes.
NVARCHAR2(length)Variable-length Unicode character data of length characters. Number of bytes stored is 2 * length for AL16UTF16 encoding and 3 * length for UTF8 encoding. Maximum length is 4,000 bytes.
BINARY_FLOATStores a single precision 32-bit floating-point number. Operations involving BINARY_FLOAT are typically performed faster than on NUMBERs. BINARY_FLOAT requires 5 bytes of storage space.
BINARY_DOUBLEStores a double precision 64-bit floating-point number. Operations involving BINARY_DOUBLE are typically performed faster than on NUMBERs. BINARY_DOUBLE requires 9 bytes of storage space.
NUMBER(precision, scale) and NUMERIC(precision, scale)Variable-length number; precision is the maximum number of digits (in front of and behind a decimal point, if used) that may be used for the number. The maximum precision supported is 38; scale is the maximum number of digits to the right of a decimal point (if used). If neither precision nor scale is specified, then a number with up to a precision and scale of 38 digits may be supplied (meaning you can supply a number with up to 38 digits, and any of those 38 digits may be in front of or behind the decimal point).
DEC and DECIMALSubtype of NUMBER. A fixed-point decimal number with up to 38 digits of decimal precision.
DOUBLE PRECISION and FLOATSubtype of NUMBER. A floating-point number with up to 38 digits of precision.
REALSubtype of NUMBER. A floating-point number with up to 18 digits of precision.
INT, INTEGER, and SMALLINTSubtype of NUMBER. An integer with up to 38 digits of decimal precision.
DATEDate and time with the century, all four digits of year, month, day, hour (in 24-hour format), minute, and second. May be used to store a date and time between January 1, 4712 B.C. and December 31, 4712 A.D. Default format is specified by the NLS_DATE_FORMAT parameter (for example: DD-MON-RR).
INTERVAL YEAR[(years_precision)] TO MONTHTime interval measured in years and months; years_precision specifies the precision for the years, which may be an integer from 0 to 9 (default is 2). Can be used to represent a positive or negative time interval.
INTERVAL DAY[(days_precision)] TO SECOND[(seconds_precision)]Time interval measured in days and seconds; days_precision specifies the precision for the days, which is an integer from 0 to 9 (default is 2); seconds_precision specifies the precision for the fractional part of the seconds, which is an integer from 0 to 9 (default is 6). Can be used to represent a positive or negative time interval.
TIMESTAMP[(seconds_precision)]Date and time with the century, all four digits of year, month, day, hour (in 24-hour format), minute, and second; seconds_precision specifies the number of digits for the fractional part of the seconds, which can be an integer from 0 to 9 (default is 6). Default format is specified by the NLS_TIMESTAMP_FORMAT parameter.
TIMESTAMP[(seconds_precision)] WITH TIME ZONEExtends TIMESTAMP to store a time zone. The time zone can be an offset from UTC, such as ??-5:0', or a region name, such as ??US/Pacific'. Default format is specified by the NLS_TIMESTAMP_TZ_FORMAT parameter.
TIMESTAMP[(seconds_precision)] WITH LOCAL TIME ZONEExtends TIMESTAMP to convert a supplied datetime to the local time zone set for the database. The process of conversion is known as normalizing the datetime. Default format is specified by the NLS_TIMESTAMP_FORMAT parameter.
CLOBVariable length single-byte character data of up to 128 terabytes.
NCLOBVariable length Unicode national character set data of up to 128 terabytes.
BLOBVariable length binary data of up to 128 terabytes.
BFILEPointer to an external file.
LONGVariable length character data of up to 2 gigabytes. Superceded by CLOB and NCLOB types, but supported for backwards compatibility.
RAW(length)Variable length binary data of up to length bytes. Maximum length is 2,000 bytes. Superceded by BLOB type, but supported for backwards compatibility.
LONG RAWVariable length binary data of up to 2 gigabytes. Superceded by BLOB type but supported for backwards compatibility.
ROWIDHexadecimal string used to represent a row address.
UROWID[(length)]Hexadecimal string representing the logical address of a row of an index-organized table; length specifies the number of bytes. Maximum length is 4,000 bytes (also default).
REF object_typeReference to an object type.
VARRAYVariable length array. This is a composite type and stores an ordered set of elements.
NESTED TABLENested table. This is a composite type and stores an unordered set of elements.
XMLTypeStores XML data.
User defined object typeYou can define your own object type and create objects of that type.


Quote from:

Oracle PL/SQL For Dummies (Paperback)

by Michael Rosenblum (Author), Paul Dorsey (Author)

# Paperback: 414 pages

# Publisher: For Dummies (June 13, 2006)

# Language: English

# ISBN-10: 0764599577

# ISBN-13: 978-0764599576

10. 1. Introduction
10. 1. 1. Oracle SQL Types
10. 1. 2. Change datatype of an existing column
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.