I am working with hibernate, and a oracle 10 db. I need to get the next sequence value from a table, and want to know how.
I saw this article, and asking: is there a better way the get the value, without defining a query?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. Getting the next (
nextval) or current (currval) value from a sequence is typically done using a select. Even in PLSQL, SELECT INTO is used, like this:Simple assignment like this won’t work: