开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜