background image
<< Creating and Using Database Objects | Using SQL Developer Interface >>
<< Creating and Using Database Objects | Using SQL Developer Interface >>

Creating and Using Tables

Creating and Using Tables
3-2 Oracle Database 2 Day Developer's Guide
The
CLOB
data type is a character large object data type that contains single-byte
or multibyte characters. The maximum size of a CLOB is (4 gigabytes - 1) x
(database block size).
The
NUMBER
data type stores zero, and integers and real numbers as positive and
negative fixed numbers with absolute values between 1.0 x 10
-130
and 1.0 x 10
126
using a fixed-point or floating-point format, with decimal-point precision. Oracle
guarantees that
NUMBER
data types are portable between different operating
systems, and recommends it for most cases where you need to store numeric data.
You can use the precision option to set the maximum number of digits in the
number, and the scale option to define how many of the digits are to the right of
the decimal separator. In the
employees
table, the
salary
column is defined as
NUMBER(8,2)
, providing 6 digits for the primary unit of currency (dollars,
pounds, marks, and so on) and 2 digits for the secondary unit of currency (cents,
pennies, pfennigs, and so on).
For floating-point numbers, Oracle Database provides the numeric
BINARY_
FLOAT
and
BINARY_DOUBLE
data types as enhancements to the basic
NUMBER
data type.
BINARY_FLOAT
(32-bit IEEE 754 format) ranges in absolute value
between 1.17549 x e
-38F
and 3.40282 x e
38F
and
BINARY_DOUBLE
(64-bit IEEE 754
format) ranges in absolute value between 2.22507485850720 x e
-308
and
1.79769313486231 x e
308
. Both use binary precision that enables faster arithmetic
calculations and often reduces storage requirements.
The
DATE
data type stores point-in-time values, dates and times; this includes the
century, year, month, day, hours, minutes, and seconds. The valid date range is
from January 1, 4712 BC to December 31, 9999 AD. Oracle Database supports
many different formats for displaying date and time values. In the
employees
table, the
hire_date
column is defined as a
DATE
.
The
TIMESTAMP
data type stores values that are precise to fractional seconds, and
is therefore useful in applications that must track event order.
The
TIMESTAMP WITH TIME ZONE
data type stores time zone information, and
can therefore record date information that must be coordinated across several
geographic regions.
Creating and Using Tables
Tables are the basic unit of data storage in an Oracle database, and hold all
user-accessible data. Tables are two-dimensional objects made up of vertical columns
that represent the fields of the table and horizontal rows that represent the values for
each record in the table.
In this section, you will create all the necessary tables and other schema objects to
implement an employee performance evaluation process for the existing
hr
schema.
See Also:
Oracle Database SQL Language Reference
See Also:
"Exploring Tables and Viewing Data"
on page 2-3