Oracle
  Home arrow Oracle arrow Page 5 - Working With Oracle on Windows: Part 2
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ORACLE

Working With Oracle on Windows: Part 2
By: Ben Shepherd
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 13
    2003-03-04

    Table of Contents:
  • Working With Oracle on Windows: Part 2
  • Databases
  • Relationships
  • Structuring your database
  • Tables in Oracle
  • User Defined Schema Objects
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Working With Oracle on Windows: Part 2 - Tables in Oracle


    (Page 5 of 7 )

    Now we know a little bit about databases, it is time to create one that works well for you. Let’s start.

    What we need to know are what data types Oracle 9i has built-in. Oracle’s built-in data types may be found at http://www.sbg.ac.at/docu/man/oracle/9i/appdev.901/a89857/oci03typ.htm

    The list is as follows,

    Internal Oracle Datatype

    Maximum Internal Length (bytes)

    Datatype Code

    VARCHAR2, NVARCHAR2

    4000

    1

    NUMBER

    2

    2

    LONG

    2^31-1 (= 2 gigabytes)

    8

    ROWID

    10

    11

    DATE

    7

    12

    RAW

     2000

     23

    LONG RAW

     2^31-1 (= 2 gigabytes)

     24

    CHAR, NCHAR

     2000

     96

    User-defined type (object type, VARRAY, Nested Table)

     N/A

     108

    REF

     N/A

     111

    CLOB, NCLOB

    4 gigabytes

     112

    BLOB

    4 gigabytes

     113

    BFILE

    4 gigabytes

     114

    TIMESTAMP

     11

     180

    TIMESTAMP WITH TIME ZONE

     13

     181

    INTERVAL YEAR TO MONTH

     5

     182

    INTERVAL DAY TO SECOND

     11

     183

    UROWID

     3950

     208

     TIMESTAMP WITH LOCAL TIME ZONE 

     11

     231

    A way of doing this is by simply typing,

    CREATE TABLE firstTable
    (
     v_id     NUMBER      PRIMARY KEY,
     v_firstName    VARCHAR2(25),
     v_surname   VARCHAR2(30)
    )
    /

    Another way to create a table is by using a user defined schema object (i.e. an object that has been created by you).

    More Oracle Articles
    More By Ben Shepherd


     

    ORACLE ARTICLES

    - Partitioning in Oracle. What? Why? When? Who...
    - Datatypes Used in Oracle 9i
    - Creating a Database in Oracle 9i
    - Oracle with Doctor Janusz Getta
    - Working With Oracle on Windows: Part 3
    - Working With Oracle on Windows: Part 2







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek