|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
mysql error 1005 (errno: 150)
Hi,
while writing this code in MySql 5.0.1 alfa: CREATE TABLE PPE_JOB_TIME (USER_FKID INT NOT NULL, JOB_NO_FKID INT NOT NULL, TOTAL_TIME TIME NOT NULL, FOREIGN KEY (USER_FKID) REFERENCES PPE_USER (USER_ID), FOREIGN KEY (JOB_NO_FKID) REFERENCES PPE_JOB (JOB_NO)) TYPE=INNODB; I am facing the problem below: ERROR 1005 (HY000): Can't create table '.\test1\ppe_job_time.frm' (errno: 150) Now if I remove the "TYPE=INNODB" from the above statement it runs fine. I don't know why it is happening? With other tables it is running fine with "TYPE=INNODB" If anybody know about it then please help me out. Regards, Rajat Srivastava |
|
#2
|
|||
|
|||
|
MySQL errno:150
CREATE TABLE PPE_JOB_TIME (USER_FKID INT NOT NULL,
JOB_NO_FKID INT NOT NULL, TOTAL_TIME TIME NOT NULL, FOREIGN KEY (USER_FKID) REFERENCES PPE_USER (USER_ID), FOREIGN KEY (JOB_NO_FKID) REFERENCES PPE_JOB (JOB_NO)) TYPE=INNODB; A quick thought, check that USER_FKID in PPE_USER table has the same type (i.e. INT, and NOT NULL) the same goes for JOB_NO_FKID. Good luck ![]() regards, Alex Wibowo. |
|
#3
|
|||
|
|||
|
check it out
hi try this check whether the table type is innodb or not .... i mean it should be same for all the tables invoved in the foreign key issue. in your case table PPE_JOB should also be of the InnoDB type..also the field making the foreign key should be indexed.. the field data types is already similar in ur sql statements go by it and see if it works... ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > mysql error 1005 (errno: 150) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|