Question: I am having problem creating a SQL tables. my code Create table Airplane (AirplaneReg VARCHAR2(20) PRIMARY KEY, AirplaneModel VARCHAR2(20) not null, MaxCapacity number(3) not null,

I am having problem creating a SQL tables.

my code

Create table Airplane

(AirplaneReg VARCHAR2(20) PRIMARY KEY,

AirplaneModel VARCHAR2(20) not null,

MaxCapacity number(3) not null,

constraint CheckMaxCapacity check (Maxcapacity

MaintenanceDate DATE,

constraint CheckMaintenancedate check(MaintenanceDate between '01-JAN-1990' and '01-JAN-2999'));

Create table Employee

(EmpCode VARCHAR2(12) PRIMARY KEY,

EmployeeName VARCHAR2(100) not null,

EmpHP NUMBER(10), constraint UNIQEMPHP unique(EMPHP),

EmpRole VARCHAR2(50) not null);

Create table MaintenanceRecord

(MaintenanceNo VARCHAR2(20) PRIMARY KEY,

AirplaneReg VARCHAR2(20) not null, constraint MaintenanceAirplaneFK Foreign KEY (AirplaneReg) REFERENCES AIRPLANE(AirplaneReg),

MaintenanceDate DATE not null, constraint CheckMaintenanceRecordDate check("DATE" between '01-JAN-2000' and '01-JAN-2999'),

"Description" VARCHAR2(100),

EmpCode VARCHAR(12) not null, constraint EmpCodeFK Foreign Key (EmpCode) REFERENCES Employee(EmpCode),

Location VARCHAR2(20) not null);

Error output from SQL

Error starting at line : 1 in command - Create table MaintenanceRecord (MaintenanceNo VARCHAR2(20) PRIMARY KEY, AirplaneReg VARCHAR2(20) not null, constraint MaintenanceAirplaneFK Foreign KEY (AirplaneReg) REFERENCES AIRPLANE(AirplaneReg), MaintenanceDate DATE not null, constraint CheckMaintenanceRecordDate check("DATE" between '01-JAN-2000' and '01-JAN-2999'), "Description" VARCHAR2(100), EmpCode VARCHAR(12) not null, constraint EmpCodeFK Foreign Key (EmpCode) REFERENCES Employee(EmpCode), Location VARCHAR2(20) not null) Error report - ORA-00904: "DATE": invalid identifier 00904. 00000 - "%s: invalid identifier" *Cause: *Action:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!