ERROR 1005: Can't create table (errno: 150)
Date: March 24, 2005 01:20PM
I'm using the MySql version that comes with the Debian Sarge.
(mysql Ver 12.22 Distrib 4.0.23, for pc-linux-gnu (i386))
I already have one database that has a few tables with foreign keys.
I've created a anew database and it seems impossible to put new foreign keys on these tables?
So I've tried the most basic thing ans its still not working.
create table test1 (pk_alias int not null auto_increment,
primary key (pk_alias)) type=innodb;
create table test2 (pk_alias2 int unsigned not null auto_increment,
fk_test1 int not null, primary key (pk_alias2),
foreign key (fk_test1) references test1(pk_alias)) type=innodb;
I don't really get it. What am I doing wrong??
Thanks!