开发者

How to generate primary key from sequence in HSQLDB

开发者 https://www.devze.com 2023-02-05 03:58 出处:网络
Currently I am using HSQLDB 2.0.0 for my project. I have a table with primary key and a sequence. I would like to generate the primary key value from the sequence whenever a insert happens.

Currently I am using HSQLDB 2.0.0 for my project.

I have a table with primary key and a sequence.

I would like to generate the primary key value from the sequence whenever a insert happens.

Is that possible by a trigger? If so could you let me know how this can be accomplished?

Regards,

开发者_JS百科

Satya


Yes, you can do it with a trigger. See this question

Link a sequence with to an identity in hsqldb

0

精彩评论

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