|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Creating Table/Sequence in Oracle |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|