• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Identity function in HSQLDB

 
saurav sarkar
Ranch Hand
Posts: 180
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using HSQLDB for my application.
I have already created a table with a primary key.
Now i want to modify it and want to make the primary key column also an Auto incrementing one.
I saw in HSQLDB it can be achieved by the IDENTIY() function.

Could please some one please show me the correct SQL syntax for modifying the DDL for the table?.


Thanks and Regards,
Saurav
 
Angelika Angley
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
saurav sarkar
Ranch Hand
Posts: 180
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Angelika for the reply.
One more thought on the same lines, could i alter the table definition
because i have already created the table i want to add the identity function
to that.

 
Angelika Angley
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try this one:


See more here:
http://hsqldb.org/doc/guide/ch09.html#alter_table-section
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic