Tatjana Cukic <[EMAIL PROTECTED]> wrote on 10/12/2005 12:28:47 PM: > hello, > > does anybody knows the error: > can't create table '.\Cherry\#sql-288_5d.frm' > (errno:150) > > it happens when i try to create foreign keys in > Table1, and that foreign key is actually primary key > in Table2 (to which i relate my foreign key) > > Thanx a lot! > > Tatjana > > > > __________________________________ > Yahoo! Music Unlimited > Access over 1 million songs. Try it free. > http://music.yahoo.com/unlimited/ >
For all InnoDB errors (like the one you show), you use SHOW INNODB STATUS; to get detailed information. Quick rules to creating Foreign Keys (FKs): a) Both tables must be InnoDB. b) Both ends of the FK relationships must be indexed. I would guess that you do not have the column in Table1 that references the FK from Table2 as a left-most column of any key. Shawn Green Database Administrator Unimin Corporation - Spruce Pine