BC remote Oracle DBA - Call (800) 766-1884
Free Oracle Tips

Oracle Consulting Oracle Training Development

Remote DBA

 

Remote DBA Plans
Remote DBA Service

 
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Internals Magazine
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 
 

EnterpriseDB: Object Identifier (OID)

Oracle Tips by Burleson Consulting
 

OID

OID is an abbreviation of Object Identifier.  EnterpriseDB uses this special numeric type as an internal Primary Key for system tables.  This OID does NOT correspond to a ROWID.  You should NOT use this special type as a primary key for your tables.  You can however use it for certain specific functions, such as emulating BFILE support (described below in the Binary Data Types Section).

If we were to create a table with the numeric types we have discussed, it would look like this:

CREATE TABLE number_table (
  small_num      NUMBER(5),
  big_num        NUMBER(25),
  really_big_num NUMBER,
  number_float   NUMBER(15,5),
  int_field      INTEGER,
  real_float     REAL,
  double_float   DOUBLE PRECISION,
  oid_field      OID );

* Note that DOUBLE PRECSION has a space between DOUBLE and PRECISION and not an underbar (_).

We can insert into our table. I won't insert an OID just yet.  I'll do that further below in the binary section.

INSERT INTO number_table (
  small_num, big_num, really_big_num, number_float, int_field, real_float, double_float)

  VALUES
  ( 12345, 1234567890, 12345678901234567890, 123456.1234, 1234, 109283.2364, 1283723266252533.8372326362636262632);

And we can select them: 

SELECT small_num,
       big_num,
       really_big_num,
       number_float,
       int_field,
       real_float,
       double_float
  FROM number_table;

The results of running the above commands: 

edb=# CREATE TABLE number_table (
edb(#   small_num      NUMBER(5),
edb(#   big_num        NUMBER(25),
edb(#   really_big_num NUMBER,
edb(#   number_float   NUMBER(15,5),
edb(#   int_field      INTEGER,
edb(#   real_float     REAL,
edb(#   double_float   DOUBLE PRECISION,
edb(#   oid_field      OID );

CREATE TABLE

edb=# INSERT INTO number_table (
edb(#   small_num, big_num, really_big_num, number_float, int_field, real_float, double_float )
edb-#   VALUES
edb-#   ( 12345, 1234567890, 12345678901234567890, 123456.1234, 1234, 109283.2364, 1283723266252533.
8372326362636262632);
INSERT 0 1
edb=# SELECT small_num,
edb-#        big_num,
edb-#        really_big_num,
edb-#        number_float,
edb-#        int_field,
edb-#        real_float,
edb-#        double_float
edb-#   FROM number_table;

 small_num |  big_num   |    really_big_num    | number_float | int_field | real_float
|     double_float
-----------+------------+----------------------+--------------+-----------+------------+-----------------------
12345 | 1234567890 | 12345678901234567890 | 123456.12340 |      1234 |     109283 | 1.283723266
25253e+015

(1 row)

edb=#

Date and Time Data

We will primarily be working with three kinds of date/time data types:  date, timestamp and interval.



This is an excerpt from the book "EnterpriseDB: The Definitive Reference" by Rampant TechPress.


Expert Remote DBA

BC is America's oldest and largest Remote DBA Oracle support provider.  Get real Remote DBA experts, call
BC Remote DBA today.

 

 

Remote DBA Service
 

Oracle Tuning Book

Free Oracle dictionary reference poster

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

North Carolina Oracle Users Group

 

 Arabian horse breeder

Seeing eye horses

 

 

Burleson is the American Team

American Flag

 

 

BC Remote Oracle Support
P.O. Box 511 • Kittrell, NC, 27544

Remote DBA

Remote DBA Services

 

Copyright © 1996 -  2011 by Burleson Enterprises. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.



Hit Counter