Tree structure data in HSQLDB
In my project, I need to maintain data in tree hierarchy.
Below code is something which I can do in Oracle.
Can the same be done in HSQLDB?
create table corporate_slaves (
slave_id integer primary key,
supervisor_id references corporate_slaves,
name varchar(100)
);
If I use the same code, I get "Unexpected token: REFERENCES, error code: -5581"
in HSQLDB.
Can anyone su开发者_StackOverflow社区ggest how to build this kind of table?
Regards,
Satya
create table corporate_slaves (
slave_id integer primary key,
supervisor_id integer,
name varchar(100),
foreign key (supervisor_id) references corporate_slaves(slave_id)
);
精彩评论