Hello *,
i write you with an urgent problem. I would like to create forign keys to datetime field,
but it doesn't seem to work. I get [Error Code: 1005, SQL State: HY000] Can't create
table '.\sampleDB\student_module.frm' (errno: 150) error.
the tables look like
CREATE TABLE IF NOT EXISTS sampleDB.student (
student .from1 DATETIME not null,
student .from2 DATETIME not null,
PRIMARY KEY (from1))
CREATE TABLE IF NOT EXISTS gruppex.student_module(
student_module.to1 DATETIME not null,
student_module.to2 DATETIME not null,
PRIMARY KEY (to1),
FOREIGN KEY (to1) REFERENCES student (from1),
FOREIGN KEY (to2) REFERENCES student (from2))
I know that i could do this with use of ids fields, but in this case i need to use of
datetime.
Please help!!
Thanks in Advance
Przemek
---------------------------------
Gesendet von Yahoo! Mail - Jetzt mit 1GB kostenlosem Speicher