Hi,i'm a newbie about innodb,
i read the manual and found 'self-referential'...
i guess i can create a table with two refenced column and then is 'on delete
cascade',so i run the next sql in mysql4.0.15(mysqld-max-nt --console)
the code is:

#--------------test sql code1---------------------------
CREATE TABLE TESTFOREIGN
(
someid INT,
parentid INT,
PRIMARY KEY(someid),
INDEX bull (someid),
CONSTRAINT sym FOREIGN KEY (parentid)
REFERENCES TESTFOREIGN(someid)
ON DELETE CASCADE
) type=innodb
#-------------test sql code1---------------------------

i receive:
Error 1005:Cant' create table **TESTFOREIGN.frm (errno:150)






even i edit the sql as

#-------------test sql code2---------------------------
CREATE TABLE TESTFOREIGN
(
someid INT,
parentid INT,
PRIMARY KEY(someid,parentid),
FOREIGN KEY (parentid)
REFERENCES TESTFOREIGN(someid)
) type=innodb
#-------------test sql code2---------------------------

i got the same unsuceed information


now someone can help me?
thx anyway.