Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Question about adding new record in table with primary key
What is the easiest way to add new record in table with new primary key
(object id)?
I mean how I get in easy way the new primary key value, which does not exist in database, for my new record so that I can put it in databse with insert statement?
-Should I first read with the select statement (for example) the max value
of existing primary
keys and then add one to that to get new primary key value or what is the
preffered way?
-I will not use "auto increment" kind fields beacause of other part of
current system
does not use it.
-I uses Java and JDBC but that perhaps has not much to do with this thing
/ter Received on Thu Mar 06 2003 - 11:02:33 CST