• 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