I have been using the MySQL. And the ID field of the database table is AUTO INCREMENT. When I insert a new record into a database table, I can have a statement like:
and I do not have to put the ID variable in the above method. The table will give the new record an ID number that is equivalent to the ID number of the last record plus one automatically.
Now, I am inserting a new record into an Oracle database table. I am told that I cannot do what I am used to doing with the MySQL database.
How do I revise the createThread method while I have no idea about what the next sequence number shall be?
OKay, the table into which I am trying to insert new records has a sequence: dhsinfo_content-grp_seq
The DBA has done that part. I am worrying about the Java part. To give you an example the origin of my confusion, I have:
All the parameters of the updateContent() methods have known values. Where in the code we use that sequence key for INSERT? Do I insert new record this way:
[edited to fix page allignment] [ September 30, 2004: Message edited by: Jeanne Boyarsky ]
1. the table name in the Oracle database is DHSInfoContentGroup 2. ID is the column name of that table for auto increment 3. dhsinfo_content_grp_seq has been taken care of by DBA