Thanks for the repling, now I know how to create sequence, but how do I use it for one particular table, I don't know, hope if you can give me some guide.
Originally posted by Brian Nice:
I don't have my oracle book with me, but if I recall it's:
create sequence [sequence_name] start with [number] increment by [increment]
Then you can access the sequence with:
select sequence_name.nextval from dual;
long sequenceNum = 0;
Statement st = ...
ResultSet rs = st.executeQuery("Select sequence_name.nextval from dual");
if (rs.next() ) sequenceNum = rs.getLong(1);
Now you have the value stored in a variable that you can use later in your Java program for whatever you need
I'm sorry if I didn't explain it properly, but the naming policy, described at http://www.javaranch.com/name.jsp requires a name with two words. It's not that "Whongwei" or "Hongwei" are not your name, it's just that they only have one word. Do you also have another name such as a family name, or can you split the "Whongwei" into two or more names?
I'm sorry to be so picky, but this naming posicly was set up by the owner of the Java Ranch site. Thanks again for all your efforts.
Now the instruction for name is very clear, so I hope I got me right name, Eric Wang. How is it? So you can delete the two name Whongwei and Hongwei for me, I am using the same email firstname.lastname@example.org. Thanks.
It is time to said Merry Christmas to you. A Card just for you, I have take two days to do it. Hope you like it.