MySQL Forums
Forum List  »  InnoDB

MY-SQL Error 150 Can't Create table
Posted by: Abhijit Ghatnekar
Date: October 10, 2008 10:19PM

Hello All ,

I have 3 tables as a part of my database whose structure is as follows

Create Table celebrities(id int(11) NOT NULL,...<some more fields>, PRIMARY KEY(id));

Create table famous_people (id int(11) NOT NULL,...<some more fields>, PRIMARY KEY(id));


Create table starnews_celeb(starnewsid INTEGER DEFAULT NULL, celebid INTEGER DEFAULT NULL);

starnewsid is foreign key from celebrities table on id column (which gets set correctly using ALTER TABLE syntax)

celebid is foreign key from famous_people table on id column which does not get set using the same ALTER TABLE syntax --

ALTER TABLE starnews_celeb add constraint foreign key(celebid) references famous_people(id);

The Error Can't create Table : MySQL error 150 Gets Raised

Can anybody give me a possible cause of this error ? I ain't able to comprehend it.
Thank you all in advanced

Regards,
Abhjit

Options: ReplyQuote


Subject
Views
Written By
Posted
MY-SQL Error 150 Can't Create table
9122
October 10, 2008 10:19PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.