SunQuest
           Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 3rd, 2003, 05:08 PM
Susie Mohammed Susie Mohammed is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 8 Susie Mohammed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Creating Table/Sequence in Oracle

Hello Gurus, I need some help….

I am really new to Oracle database, Using the Oracle database, I am looking to Create and populate a table that will name EMPLOYEE_(adding my lastname, Bepat here), which has the following structure and data values:
E_id NUMBER(2) primary key (use sequence to input value, starting at 200)
E_lastname VARCHAR2(30) Murray Jones
E_firstname VARCHAR2(20) Mary John
E_address VARCHAR2(30) 144 Fisherman's Way 18 Chapel Road
E_city VARCHAR2(25) Haymarket West Mifflin
E_state CHAR(2) VA PA
E_hire_date DATE 01/02/03 01/03/03

I would like to;
Show the code used to create the sequence with sql*plus.
Show the code used to create the table with sql*plus.
Show the code used to populate the table, using the data values in bold, with sql*plus.
Show any outputs from sql*plus.

This is what I have so far:

SQL> CREATE TABLE employees (
E_id_no NUMBER(2) NOT NULL,
E_lastname VARCHAR2(30) Murray Jones
E_firstname VARCHAR2(20) Mary John
E_address VARCHAR2(30) 144 Fisherman’s Way 18 Chapel Road
E_city VARCHAR2(25) Haymarket West Mifflin
E_state CHAR(2) VA PA
E_hire_date DATE 01/02/03 01/03/03
PRIMARY KEY(E_id_no)
);


sequence:

SQL> CREATE SEQUENCE E_id_no START WITH 1
INCREMENT BY 1 MAXVALUE 9999;




Susie

Last edited by Susie Mohammed : August 3rd, 2003 at 08:58 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Creating Table/Sequence in Oracle


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway