Whe I try to execute this code:
CREATE TABLE users(
id CHAR(10) NOT NULL PRIMARY KEY,
title VARCHAR(100),
name VARCHAR(100)
)
CREATE TABLE cars (
idcars TINYINT(4) UNSIGNED NOT NULL AUTO_INCREMENT,
made VARCHAR(100) NOT NULL,
deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (idcars),
CONSTRAINT FK_made FOREIGN KEY FK_made (made)
REFERENCES users(name)
)
i get the following error:
ERROR 1005 (HY000): Can't create table '.\mydba\cars.frm' (errno: 150)
And when I remove the constraint part, everything goes well.
I'm using MySQL 4.1.12a-nt and have created database using MySQL Administrator.
Does anyone know what seems to be the problem, and how to solve it???
Thnx.
CREATE TABLE users(
id CHAR(10) NOT NULL PRIMARY KEY,
title VARCHAR(100),
name VARCHAR(100)
)
CREATE TABLE cars (
idcars TINYINT(4) UNSIGNED NOT NULL AUTO_INCREMENT,
made VARCHAR(100) NOT NULL,
deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (idcars),
CONSTRAINT FK_made FOREIGN KEY FK_made (made)
REFERENCES users(name)
)
i get the following error:
ERROR 1005 (HY000): Can't create table '.\mydba\cars.frm' (errno: 150)
And when I remove the constraint part, everything goes well.
I'm using MySQL 4.1.12a-nt and have created database using MySQL Administrator.
Does anyone know what seems to be the problem, and how to solve it???
Thnx.