Home arrow Oracle arrow Page 5 - Working With Oracle on Windows: Part 2
ORACLE

Working With Oracle on Windows: Part 2


Now we have installed Oracle we can now begin to familiarise ourselves with use of SQL and how to use basic Oracle expressions.

Author Info:
By: Ben Shepherd
Rating: 3 stars3 stars3 stars3 stars3 stars / 13
March 04, 2003
TABLE OF CONTENTS:
  1. · Working With Oracle on Windows: Part 2
  2. · Databases
  3. · Relationships
  4. · Structuring your database
  5. · Tables in Oracle
  6. · User Defined Schema Objects
  7. · Conclusion

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

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).


blog comments powered by Disqus
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

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 7 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials