This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes regarding dual table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "regarding dual table" Watch "regarding dual table" New topic
Author

regarding dual table

ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 193
Hi all,
I want to know what is the importance of dual table?
Why we get next sequence number from this table?

regards,
ajse
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: regarding dual table
 
Similar Threads
SQL doubt
Problem connecting to DB after DB restart
stale jdbc Connection
Oracle Pivot table
Test Table