cannot add foriegn key constraint

Aug 15 2015 1:47 AM
Hi,
 
In MySql command prompt i getting this error.Cannot add foriegn key constraint .
 
CREATE TABLE Contibutors (
Id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
MagazineId INT(6) NOT NULL,
Name VARCHAR(50) NOT NULL,
Email VARCHAR(100),
Guid VARCHAR(36) NOT NULL,
ContentSubmitted BIT,
CreatedOn DATETIME,
FOREIGN KEY (MagazineId) REFERENCES Magazine(Id)
);
 
 If i do  any thing wrong here.Will you please tell me.
 
Thanks,
prathyusha 
 
 

Answers (3)