This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with sequence

 
gvasu kumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
in my application i am using the Oracle Sequence for generating the sequence of numbers.how can i invoke the sequence from the JDBC.
Thanx in advance
 
gvasu kumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry i forgot to say i am using preparedstatement
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe it is 'select <sequence_name>.next from dual' but I'd have to go check. I'm sure someone will correct me soon if I'm wrong.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not quite right, it should be 'nextval', not 'next'.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic