creating table result in errno 150 I'm trying to create the following schema, but I'm getting errors when I'm trying to create project and staffphone tables. 

Not sure what is it complaining about. 

mysql&gt; CREATE TABLE staff(
-&gt; StaffID INT AUTO_INCREMENT PRIMARY KEY,
-&gt; FirstName VARCHAR(15) NOT NULL,
-&gt; LastName VARCHAR(15) NOT NULL,
-&gt; Address VARCHAR(30) ,
-&gt; City VARCHAR(15) ,
-&gt; State VARCHAR(3) ,
-&gt; Position VARCHAR(20) NOT NULL,
-&gt; Wage INT NOT NULL
-&gt; );
Query OK, 0 rows affected (0.02 sec)

mysql&gt; CREATE TABLE projects (
-&gt; StaffID INT NOT NULL,
-&gt; ProjectName VARCHAR(20) NOT NULL,
-&gt; Allocation INT NOT NULL,
-&gt; PRIMARY KEY (StaffID, ProjectName) ,
-&gt; FOREIGN KEY (StaffID) REFERENCES Staff(StaffID) ON DELETE CASCADE
-&gt; );
ERROR 1005 (HY000): Can't create table 'staff.projects' (errno: 150)

mysql&gt; CREATE TABLE staffphone (
-&gt; StaffID INT NOT NULL,
-&gt; PhoneNumber VARCHAR(15) NOT NULL,
-&gt; PRIMARY KEY (StaffID, PhoneNumber) ,
-&gt; FOREIGN KEY (StaffID) REFERENCES Staff(StaffID) ON DELETE CASCADE
-&gt; );
ERROR 1005 (HY000): Can't create table 'staff.staffphone' (errno: 150)
mysql&gt;


Any idea would be helpful. 

Thank you
As was stated in the comments by @yercube, you have a case sensitivity issue.

SOLUTION #1

Create the first table with the name Staff

CREATE TABLE Staff(
   StaffID INT AUTO_INCREMENT PRIMARY KEY,
   FirstName VARCHAR(15) NOT NULL,
   LastName VARCHAR(15) NOT NULL,
   Address VARCHAR(30) ,
   City VARCHAR(15) ,
   State VARCHAR(3) ,
   Position VARCHAR(20) NOT NULL,
   Wage INT NOT NULL
);


Then, create the other two tables. It should work.

SOLUTION #2 (based on @ypercube's suggestion)

Keep the table staff, but create the other two like this:

CREATE TABLE projects (
    StaffID INT NOT NULL,
    ProjectName VARCHAR(20) NOT NULL,
    Allocation INT NOT NULL,
    PRIMARY KEY (StaffID, ProjectName) ,
    FOREIGN KEY (StaffID) REFERENCES staff(StaffID) ON DELETE CASCADE
 );

CREATE TABLE staffphone (
    StaffID INT NOT NULL,
    PhoneNumber VARCHAR(15) NOT NULL,
    PRIMARY KEY (StaffID, PhoneNumber) ,
    FOREIGN KEY (StaffID) REFERENCES staff(StaffID) ON DELETE CASCADE
);


Give it a Try !!!