Jump to content

error message


usemysql

Recommended Posts

    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>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.