• Post Reply Bookmark Topic Watch Topic
  • New Topic

regarding dual table  RSS feed

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I want to know what is the importance of dual table?
Why we get next sequence number from this table?

regards,
ajse
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dual is a place holder, nothing more. It exists as a table containing one column called dummy with the value x. You use it to return constant values, such as the value of a sequence. The reason you use dual is it is guarenteed to only ever have one row and it is visible to all users.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!