Question: How to fix this error I have create the tables for my database project and I tried to insert information to run the program? Error

How to fix this error I have create the tables for my database project and I tried to insert information to run the program?

Error Code: 1054. Unknown column '9378' in 'field list'

INSERT INTO `Employee` (`EmployeeID`, `First_Name`, `LastName`, `StartDate`, `EndDate`, `HourlyWage`, `HoursWorked`, `IsPayroll`) VALUES (`9378`, `Joshua`, `Price`, `2015-10-12`, NULL, 25.00, 40, 0), (`9379`, `Tasha`, `Brown`, `2018-08-09`, NULL, 20.00, 40, 1), (`9380`, `Jaime`, `Davis`, `2020-11-05`, `2021-01-01`, 16.00, 0, 0), (`9381`, `Jimmy`, `Brown`, `2021-06-26`, NULL, 11.00, 15, 0);

INSERT INTO `Maintenance-Log` (`ApplianceID`, `ApplianceName`, `ServiceBy`, `LastServiceDate`, `NextServiceDate` ) VALUES (`2005`, `Barista Machine`, `9378`, `2021-08-06`, `2021-08-06`), (`2006`, `Hot Water Dispenser`, `9380`, `2020-12-31`, `2022-12-31`), (`2007`, `Blender Machine`, `9381`, `2019-05-21`, `2019-05-21`);

INSERT INTO `MenuItemPrep` (`BatchID`, `Name`, `Flavor`, `Count`, `ExpirationDate`, `PreparedBy`) VALUES (`7578`, `Iced Coffee`, `Caramel`, 10, `2019-03-11`, `9378`), (`7579`, `Chocolate Syrup`, `Chocolate`, 20, `2020-05-17`, `9378`), (`7580`, `Hot Coffee`, `Mocha`, 10, `2021-10-21`, `9381`), (`7581`, `Pastry`, `Almond`, 5, `2022-12-19`, `9378`);

The tables I created are below:

CREATE TABLE `Employee`( `EmployeeID` INT NOT NULL, `First_Name` VARCHAR(45) NOT NULL, `LastName` VARCHAR(45) NOT NULL, `StartDate` DATE NOT NULL, `EndDate` DATE, `HourlyWage` DECIMAL(10,2) NOT NULL, `HoursWorked` INT, `IsPayroll` TINYINT NOT NULL, PRIMARY KEY (`EmployeeID`));

CREATE TABLE `Maintenance_Log`( `ApplianceID` INT NOT NULL, `ApplianceName` VARCHAR(45) NOT NULL, `ServiceBy`INT NOT NULL, `LastServiceDate` DATE NOT NULL, `NextServiceDate` DATE, PRIMARY KEY (`ApplianceID`), CONSTRAINT `ServiceBy` FOREIGN KEY (`ServiceBy`) REFERENCES `Employee`(`EmployeeID`) );

CREATE TABLE `MenuItemPrep`( `BatchID` INT NOT NULL, `Name` VARCHAR(45) NOT NULL, `Flavor` VARCHAR(45) NOT NULL, `Count` INT NOT NULL, `ExpirationDate` DATE NOT NULL, `PreparedBy` INT NOT NULL, PRIMARY KEY (`BatchID`), CONSTRAINT `PreparedBy` FOREIGN KEY (`PreparedBy`) REFERENCES `Employee`(`EmployeeID`) );

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!