Click here to Skip to main content
15,896,349 members

Comments by bearforever99 (Top 8 by date)

bearforever99 13-Oct-16 19:02pm View    
Yes, a bit. I searched for describe table structure
bearforever99 9-Oct-16 5:07am View    
Just give me for example those please...i just get understand soon..
bearforever99 8-Oct-16 6:48am View    
It's working now then but I got some error...Please take a look above up...
bearforever99 8-Oct-16 1:06am View    
Deleted
I have still problem that creates 5 tables not working so it say "ORA-01031: insufficient privileges" I don't know what going on?

DROPPING Computer Repairs Part 2 database tables
DROPPING CR_employee table
DROP table CR_employee CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00942: table or view does not exist


DROPPING CR_task table
DROP table CR_task CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00942: table or view does not exist


DROPPING CR_computer table
DROP table CR_computer CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00942: table or view does not exist


DROPPING CR_job table
DROP table CR_job CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00942: table or view does not exist


DROPPING CR_empcomputer table
DROP table CR_empcomputer CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00942: table or view does not exist


Creating CR_employee Table
create table CR_employee
*
ERROR at line 1:
ORA-01031: insufficient privileges


Creating CR_task Table
create table CR_task
*
ERROR at line 1:
ORA-01031: insufficient privileges


Creating CR_computer Table
create table CR_computer
*
ERROR at line 1:
ORA-01031: insufficient privileges


Creating CR_job Table
create table CR_job
*
ERROR at line 1:
ORA-01031: insufficient privileges


Creating CR_empcomputer Table
create table CR_empcomputer
*
ERROR at line 1:
ORA-01031: insufficient privileges


showing the Computer Repairs Part 2 Tables

no rows selected

my script here:

/* Clear the screen */
clear screen;

-- setting the output to show all the results
set serveroutput on size 4000

-- Spooling Prompts: DROPPING Computer Repairs Part 2 tables
PROMPT DROPPING Computer Repairs Part 2 database tables

PROMPT DROPPING CR_employee table
DROP table CR_employee CASCADE CONSTRAINTS;

PROMPT DROPPING CR_task table
DROP table CR_task CASCADE CONSTRAINTS;

PROMPT DROPPING CR_computer table
DROP table CR_computer CASCADE CONSTRAINTS;

PROMPT DROPPING CR_job table
DROP table CR_job CASCADE CONSTRAINTS;

PROMPT DROPPING CR_empcomputer table
DROP table CR_empcomputer CASCADE CONSTRAINTS;

-- Spooling Prompts: CR_employee Table
PROMPT Creating CR_employee Table

create table CR_employee
(
EmpId char(2),
FirstName varchar(20) NOT NULL,
LastName varchar(20) NOT NULL,
Gender char(1) NOT NULL CHECK(gender IN ('M', 'F')),
DateJoined date NOT NULL,
DateLeft date,
Contract char(4) NOT NULL,
Constraint CR_employeePK PRIMARY KEY (EmpId)
);

-- Spooling Prompts: CR_task Table
PROMPT Creating CR_task Table

create table CR_task
(
TaskId char(4),
TaskName varchar(25) NOT NULL,
GivenDate date NOT NULL,
StartDate date,
EndDate date,
MaxHours number(3,1) DEFAULT (20.0),
Constraint CR_taskPK PRIMARY KEY (TaskId)
);

-- Spooling Prompts: CR_computer table
PROMPT Creating CR_computer Table

create table CR_computer
(
SerialNum char(7),
Make varchar(12) NOT NULL,
Model varchar(20) NOT NULL,
ProcessorType varchar(20) NOT NULL,
ProcessorSpeed number(4,2) NOT NULL,
RAM char(7),
DiskSize char(6),
constraint CR_computerPK PRIMARY KEY (SerialNum)
);

-- Spooling Prompts: CR_job table
PROMPT Creating CR_job Table

create table CR_job
(
TaskId char(4) NOT NULL,
EmpId char(2) NOT NULL,
HoursSpent number(3,1) DEFAULT (20.0),
constraint CR_jobPK PRIMARY KEY (TaskId, EmpId),
constraint CR_taskFK FOREIGN KEY (TaskId) REFERENCES CR_task (TaskId),
constraint CR_employeeFK FOREIGN KEY (EmpId) REFERENCES CR_employee (EmpId)
);

-- Spooling Prompts: CR_empcomputer table
PROMPT Creating CR_empcomputer Table

create table CR_empcomputer
(
SerialNum char(7) NOT NULL,
EmpId char(2) NOT NULL,
DateAssigned date NOT NULL,
Notes varchar(50),
constraint CR_empcomputer PRIMARY KEY (SerialNum, EmpId),
constraint CR_computerFK FOREIGN KEY (SerialNum) REFERENCES CR_computer (SerialNum),
constraint CR_employeeFK FOREIGN KEY (EmpId) REFERENCES CR_employee (EmpId)
);

-- Spooling Prompts: Showing the Computer Repairs Part 2 Tables
PROMPT showing the Compute
bearforever99 7-Oct-16 23:47pm View    
Deleted
It's not working on creating employee...here:

ROPPING Computer Repairs Part 2 database tables
DROPPING CR_employee table
DROP table CR_employee CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00942: table or view does not exist


DROPPING CR_task table
DROP table CR_task CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00942: table or view does not exist


DROPPING CR_computer table
DROP table CR_computer CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00942: table or view does not exist


DROPPING CR_job table
DROP table CR_job CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00942: table or view does not exist


DROPPING CR_empcomputer table
DROP table CR_empcomputer CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00942: table or view does not exist


Creating CR_employee Table
create table CR_employee
*
ERROR at line 1:
ORA-01031: insufficient privileges


Creating CR_task Table
MaxHours numeric(3,1) NOT NULL DEFAULT (20.0)
*
ERROR at line 8:
ORA-00907: missing right parenthesis


Creating CR_computer Table
ProcessorSpeed numric(4,2) NOT NULL,
*
ERROR at line 7:
ORA-00907: missing right parenthesis


Creating CR_job Table
HoursSpent numeric(3,1) NOT NULL CONSTRAINT DF_job_HoursSpent DEFAULT (20.0),
*
ERROR at line 5:
ORA-02253: constraint specification not allowed here


Creating CR_empcomputer Table
CONSTRAINT FK_empcomputer_computer FOREIGN KEY (SerialNum) REFERENCES computer (SerialNum),
*
ERROR at line 8:
ORA-00907: missing right parenthesis


showing the Computer Repairs Part 2 Tables

no rows selected

I dont get it what some error for create employee..? Please get solve my script..