Reader small image

You're reading from  Advanced Oracle PL/SQL Developer's Guide (Second Edition) - Second Edition

Product typeBook
Published inFeb 2016
Reading LevelIntermediate
Publisher
ISBN-139781785284809
Edition2nd Edition
Languages
Right arrow
Author (1)
Saurabh K. Gupta
Saurabh K. Gupta
author image
Saurabh K. Gupta

Saurabh K. Gupta is a seasoned database technologist with extensive experience in designing high performance and highly available database applications. His technology focus has been centered around Oracle Database architecture, Oracle Cloud platform, Database In-Memory, Database Consolidation, Multitenant, Exadata, Big Data, and Hadoop. He has authored the first edition of this book. He is an active speaker at technical conferences from Oracle Technology Network, IOUG Collaborate'15, AIOUG Sangam, and Tech Days. Connect with him on his twitter handle (or SAURABHKG) or through his technical blog www.sbhoracle. wordpress.com, with comments, suggestions, and feedback regarding this book.
Read more about Saurabh K. Gupta

Right arrow

Subtypes


A subtype is a data type that gets evolved from an existing scalar data type. The purpose of creating subtypes, though not mandatory, is to customize the primary data types by controlling certain features such as nullability, range, or sign. An unconstrained subtype is often used in place of primary data types to maintain application standards.

The subtype inherits the behavior of its parent base type and extends it further by a distinguishing feature. For example, NATURALN is a subtype of BINARY_INTEGER, which prevents the entry of nulls and negative values. Similarly, SIGNTYPE permits only three fixed values: -1, 0, or 1.

The following table shows the base types and subtypes under each scalar data type:

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Advanced Oracle PL/SQL Developer's Guide (Second Edition) - Second Edition
Published in: Feb 2016Publisher: ISBN-13: 9781785284809

Author (1)

author image
Saurabh K. Gupta

Saurabh K. Gupta is a seasoned database technologist with extensive experience in designing high performance and highly available database applications. His technology focus has been centered around Oracle Database architecture, Oracle Cloud platform, Database In-Memory, Database Consolidation, Multitenant, Exadata, Big Data, and Hadoop. He has authored the first edition of this book. He is an active speaker at technical conferences from Oracle Technology Network, IOUG Collaborate'15, AIOUG Sangam, and Tech Days. Connect with him on his twitter handle (or SAURABHKG) or through his technical blog www.sbhoracle. wordpress.com, with comments, suggestions, and feedback regarding this book.
Read more about Saurabh K. Gupta

Number

Character

Date/Time

Boolean

NUMBER

VARCHAR

DATE

BOOLEAN

DECIMAL/DEC

VARCHAR2

INTERVAL

 

DOUBLE PRECISION

NVARCHAR2

TIMESTAMP

FLOAT

CHAR

 

INTEGER/INT

NCHAR

NUMERIC

CHARACTER

REAL

LONG

SMALLINT

LONG RAW

PLS_INTEGER

RAW

BINARY_DOUBLE

ROWID

BINARY_FLOAT...