MySQL Forums
Forum List  »  InnoDB

error on rename of
Posted by: richard white
Date: March 17, 2008 01:04PM

Hi, i have a table that has a column referencing another table. it makes sense that if i try to delete the parent table then i am not allowed, but i am trying to drop the column that has the reference to the parent and it tells me error on rename of....

if i show create table i get the following result

qu_41_tb_24 | CREATE TABLE `qu_41_tb_24` (
`subjectID` bigint(20) NOT NULL,
`questionnaireID` bigint(20) NOT NULL,
`q_27` bigint(20) default NULL,
`q_29` date default NULL,
PRIMARY KEY (`subjectID`,`questionnaireID`),
KEY `q_27` (`q_27`),
CONSTRAINT `qu_41_tb_24_ibfk_1` FOREIGN KEY (`subjectID`, `questionnaireID`) R
EFERENCES `subjectquestionnaires` (`subjectID`, `questionnaireID`) ON DELETE CAS
CADE ON UPDATE CASCADE,
CONSTRAINT `qu_41_tb_24_ibfk_2` FOREIGN KEY (`q_27`) REFERENCES `lookup_qcompl
etor` (`lookupValue`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |

why cant i just delete the column q_27 without getting the error message:

mysql> alter table qu_41_tb_24 drop q_27;
ERROR 1025 (HY000): Error on rename of '.\portexunitich\#sql-17bc_a' to '.\portexunitich\qu_41_tb_24' (errno:150)

thanks very much for your help

Options: ReplyQuote


Subject
Views
Written By
Posted
error on rename of
3649
March 17, 2008 01:04PM
1843
March 18, 2008 08:08AM


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.