6

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,

Satya

Lukas Eder
  • 211,314
  • 129
  • 689
  • 1,509
Satya
  • 2,094
  • 6
  • 37
  • 60
  • possible duplicate of [Link a sequence with to an identity in hsqldb](http://stackoverflow.com/questions/2954045/link-a-sequence-with-to-an-identity-in-hsqldb) – Lukas Eder Nov 14 '14 at 09:31

1 Answers1

3

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

Link a sequence with to an identity in hsqldb

Community
  • 1
  • 1
fredt
  • 24,044
  • 3
  • 40
  • 61