Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to call db sequences from java

564380Jun 19 2009 — edited Jun 22 2009
Hi,
I'm trying to insert some data into database tables from Java using preapared statement of java.I've one column as Primary key and I want to add it as a sequence.Please let me know how to do the same..
here is a part of that code

insertStatement.setString(1, student_id_seq.nextval*);
insertStatement.setString(2, batch);
insertStatement.setString(3, course);
insertStatement.setString(4, firstname);
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 20 2009
Added on Jun 19 2009
7 comments
1,709 views