A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Databases
»
JDBC
Author
Getting the value of a sequence using JDBC ...
Vassili Vladimir
Ranch Hand
Joined: Mar 08, 2007
Posts: 1585
posted
Aug 16, 2007 03:07:00
0
Hi,
I have an SQL sequence which i want to get it's next value using
JDBC
, so is that possible ?
Please feel free to advice ...
Thanks in advance ...
Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Vassili Vladimir
Ranch Hand
Joined: Mar 08, 2007
Posts: 1585
posted
Aug 16, 2007 03:26:00
0
It worked
I did the following :
SELECT SEQUENCE_NAME.NEXTVAL FROM DUAL
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Getting the value of a sequence using JDBC ...
Similar Threads
use of serail key (auto increment)
Returning a sequence id
Hibernate- How get next value from a squence
getting Primary key when inserting
problem with sequence
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter