Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Question about adding new record in table with primary key

Question about adding new record in table with primary key

From: ret <heikxxx._at_lho.com>
Date: Thu, 6 Mar 2003 19:02:33 +0200
Message-ID: <b47un5$qf9$1@nyytiset.pp.htv.fi>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US