开发者

Tree structure data in HSQLDB

开发者 https://www.devze.com 2023-02-08 04:13 出处:网络
In my project, I need to maintain data in tree hierarchy. Below code is something which I can do in Oracle.

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)
);
0

精彩评论

暂无评论...
验证码 换一张
取 消