Question: I need help inserting the values listed below into the tables. I can't figure out the syntax error. Please Help. CREATE TABLE Vehicle ( Vehicle_ID

I need help inserting the values listed below into the tables. I can't figure out the syntax error. Please Help.

CREATE TABLE Vehicle (

Vehicle_ID VARCHAR2(10),

Vehicle_VIN VARCHAR2 (17) Unique,

Vehicle_Make VARCHAR2 (20) NOT NULL,

Vehicle_Model VARCHAR2 (20) NOT NULL,

Vehicle_Year DATE NOT NULL,

Vehicle_Purchase_Cost NUMBER (10,2),

Vehicle_Mileage NUMBER (7),

Vehicle_Mileage_Date DATE,

Vehicle_Office VARCHAR2 (3),

PRIMARY KEY (Vehicle_ID) );

CREATE TABLE VehicleMaintenance ( V_Maint_ID VARCHAR2(10),

V_Maint_Mileage NUMBER (7) NOT NULL,

V_Maint_Type VARCHAR (50) NOT NULL,

V_Maint_Date DATE NOT NULL,

V_Maint_Cost NUMBER (7,2),

Vehicle_ID VARCHAR2(4),

PRIMARY KEY (V_MAINT_ID),

FOREIGN KEY (Vehicle_ID) REFERENCES vehicle

);

INSERT INTO VEHICLE VALUES ('0001','1234567890123451',Toyota,Prius, to_date('2020','yyyy'), 26000, 5800, to_date('03-12-2021','mm-dd-yyy'),10a);

INSERT INTO VEHICLE VALUES ('0002','01234567890123451',Chev,Trail-B, to_date('2011','yyyy'), 49000, 159000, to_date('10-19-2020','mm-dd-yyy),10a);

INSERT INTO VEHICLE VALUES ('0003','01234567890123453',Ford,F-150, to_date('2015', 'yyyy'), 39000, 89000, to_date('03-13-2021','mm-dd-yyy'),10b);

INSERT INTO VEHICLE VALUES ('0004','01234567890123453',Ford,Escape, to_date('2018',yyyy'), 25000, 45000,Null,10b);

INSERT INTO VEHICLEMAINTENANCE VALUES ('101',102000,'Standard', to_date('08-20-2017','mm-dd-yyyy'),155.05,'0002');

INSERT INTO VEHICLEMAINTENANCE VALUES ('423',123909,'Standard', to_date('09-02-2018','mm-dd-yyyy'),165.00,'0002');

INSERT INTO VEHICLEMAINTENANCE VALUES ('689',145000,'Brakes', to_date('06-20-2019','mm-dd-yyyy'),450.08,'0002');

INSERT INTO VEHICLEMAINTENANCE VALUES ('323',12345,'Standard',to_date('11-13-2011','mm-dd-yyyy'),160.00,'0003');

INSERT INTO VEHICLEMAINTENANCE VALUES ('645',32090,'Steering', to_date('05-20-2019','mm-dd-yyyy'),890.00,'0003');

INSERT INTO VEHICLEMAINTENANCE VALUES ('900',40001,'Standard',to_date('10-20-2020','mm-dd-yyyy'),180.05,'0004');

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 Databases Questions!