usemysql Posted June 20, 2007 Share Posted June 20, 2007 I was trying to create a table using the statment below (I am using mysql version of 5.0.)but I instead I got this error message does anybody know why?please help... mysql> create table dvd -> (dvdid int not null auto_increment primary key, -> title varchar(40) not null, -> rls YEAR not null, -> qnty int not null, -> TypeID varchar(4) not null, -> FormatID varchar(4) not null, -> RateID varchar(4) not null, -> StudioID varchar(4) not null, -> StatID varchar(4) not null, -> foreign key(TypeID) references movtype (TypeID), -> foreign key(FormatID) references format (FormatID), -> foreign key(RateID) references rating (RateID), -> foreign key(StudioID) references studio (StudioID), -> foreign key(StatID) references status (StatID) -> )ENGINE = INNODB; ERROR 1005 (HY000): Can't create table '.\dvd_rentals\dvd.frm' (errno: 150) mysql> Quote Link to comment https://forums.phpfreaks.com/topic/56425-error-message/ Share on other sites More sharing options...
skadet Posted June 20, 2007 Share Posted June 20, 2007 Are your other tables (movtype, format, rating, studio, status) also InnoDB? Quote Link to comment https://forums.phpfreaks.com/topic/56425-error-message/#findComment-278686 Share on other sites More sharing options...
Wildbug Posted June 20, 2007 Share Posted June 20, 2007 1005 (ER_CANT_CREATE_TABLE) Cannot create table. If the error message refers to errno 150, table creation failed because a foreign key constraint was not correctly formed. If the error message refers to errno -1, table creation probably failed because the table includes a column name that matched the name of an internal InnoDB table. Quote Link to comment https://forums.phpfreaks.com/topic/56425-error-message/#findComment-278903 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.