Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> How do I retrive newly added records?
Hello!
I'm working on a java applet that adds records to an Oracle database.
To add a new record I use the following construct: statement.executeUpdate ("INSERT INTO mytable VALUES (0, myvalue1, myvalue2, ...)");
The catch is that the first 0 is a primary key column and the server automatically assigns a unique running number instead of the value I provide. How can I get hold of the server assigned primary key value? I need it to add records to other tables that has this key as a foreign key.
Any input is appreciated.
Regards,
Fredrik
--
I don't see why there's a problem with computers thinking it's the year 1900. Computers weren't even invented in 1900. Fredrik Öhrn Chalmers University of Technology d96ohrn_at_ios.chalmers.se SwedenReceived on Sat May 01 1999 - 07:51:54 CDT
![]() |
![]() |