MySQL Forums
Forum List  »  InnoDB

mysql error code:150
Posted by: Gavy Singh
Date: December 13, 2007 01:18AM

i have an mysql question which is causing me trouble, i am using both phpmyadmin and mysql gui for my work..

my problem is when i try to enforce the on cascade delete functionality i run into this error:


 
ALTER TABLE properties_details ADD FOREIGN KEY ( suburb_id ) REFERENCES suburbs( suburb_id ) ON DELETE CASCADE ;

the suburb_id in the properties_details table is the foriegn key and inj the suburb table it is the primary key..

so when i run it, it gives me this error:

MySQL said:

#1005 - Can't create table '.\realestatenz\#sql-1698_14.frm' (errno: 150)

has anybody have experience in it

please let me know thanks

suburb have suburb_id as primary key
properties_details table have the suburb_id field

when i run it gets me to above error:

Options: ReplyQuote


Subject
Views
Written By
Posted
mysql error code:150
20613
December 13, 2007 01:18AM
9084
December 21, 2007 11:34PM
6113
May 15, 2008 07:40AM
6155
August 29, 2008 07:56AM


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.