MySQL Create Table w/Constraints

I'm running each statement of this code independently. When I try to create the Orders table the way it is now, it throws the following error:

ERROR [HY000] [MySQL][ODBC 5.1 Driver][mysqld-5.0.27-community-nt]Can't create table '.\webarch\orders.frm' (errno: 150)
Finished executing selected script from CreateJohnsonMotorsports.sql

DROP TABLE Orders;
DROP TABLE Customers;
DROP TABLE Employees;
DROP TABLE Products;
 
CREATE TABLE Customers (
	CustomerID INT PRIMARY KEY AUTO_INCREMENT,
	CustomerLastName VARCHAR (30) NOT NULL,
	CustomerFirstName VARCHAR (30) NULL,
	CustomerAddress VARCHAR (30) NULL,
	CustomerCity VARCHAR (30) NULL,
	CustomerState VARCHAR (2) NULL,
	CustomerZip VARCHAR (10) NULL,
	CustomerPhone VARCHAR (20) NULL,
    CustomerUsername VARCHAR (10) NULL,
    CustomerPassword VARCHAR (20) NULL) ENGINE=INNODB;
    
CREATE TABLE Employees (
	EmployeeID INT PRIMARY KEY AUTO_INCREMENT,
	EmployeeLastName VARCHAR (30) NOT NULL,
	EmployeeFirstName VARCHAR (30) NULL,
    EmployeeUsername VARCHAR (10) NULL,
    EmployeePassword VARCHAR (20) NULL,
    IsManager BOOLEAN NULL) ENGINE=INNODB;
    
CREATE TABLE Products (
	ProductID INT PRIMARY KEY AUTO_INCREMENT,
	ProductName VARCHAR (50) NULL,
	ProductDescription VARCHAR (100) NULL,
	ProductQOH INT NOT NULL,
	ProductColor VARCHAR (20) NULL,	
	ProductSize VARCHAR (5) NULL,	
	ProductPrice DECIMAL(30,2) NULL) ENGINE=INNODB;
 
CREATE TABLE Orders (
	OrderID INT PRIMARY KEY AUTO_INCREMENT,
	ProductID INT NOT NULL,
	EmployeeID INT NULL,
	CustomerID INT NOT NULL,
	OrderDate DATETIME NOT NULL,
	QuantityOrdered INT NOT NULL,
	SalePrice DECIMAL(30,2) NULL,
	CONSTRAINT FK_Order_CustomerID FOREIGN KEY (CustomerID) REFERENCES Customer(CustomerID),
	CONSTRAINT FK_Order_EmployeeID FOREIGN KEY (EmployeeID) REFERENCES Employee(EmployeeID),
	CONSTRAINT FK_Order_Product FOREIGN KEY (ProductID) REFERENCES Products(ProductID)) ENGINE=INNODB;

Open in new window

Messenger569Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

philipjonathanCommented:
Check these 2 lines, the table name should be Customers and Employees (with 's')

CONSTRAINT FK_Order_CustomerID FOREIGN KEY (CustomerID) REFERENCES Customers(CustomerID),
CONSTRAINT FK_Order_EmployeeID FOREIGN KEY (EmployeeID) REFERENCES Employees(EmployeeID),
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.