Home » SQL & PL/SQL » SQL & PL/SQL » how to get newly inserted row (or rowid) in oracle?
how to get newly inserted row (or rowid) in oracle? [message #199253] Sun, 22 October 2006 22:26 Go to next message
dak.dba
Messages: 7
Registered: October 2006
Location: hyd
Junior Member
hi,
I have situation like this.
I have to insert one row into table and have to get its ID to process further.
Thanks in advance for replies (its very urgent)
Re: how to get newly inserted row (or rowid) in oracle? [message #199260 is a reply to message #199253] Sun, 22 October 2006 23:32 Go to previous messageGo to next message
rleishman
Messages: 3728
Registered: October 2005
Location: Melbourne, Australia
Senior Member
RTFM
Re: how to get newly inserted row (or rowid) in oracle? [message #199262 is a reply to message #199260] Sun, 22 October 2006 23:35 Go to previous messageGo to next message
dak.dba
Messages: 7
Registered: October 2006
Location: hyd
Junior Member
I have used returning clause.
I am looking for better alternative.
Our Java Programmers have to use this query in their programming.
Any suggestions?
Re: how to get newly inserted row (or rowid) in oracle? [message #199267 is a reply to message #199262] Mon, 23 October 2006 00:29 Go to previous message
rleishman
Messages: 3728
Registered: October 2005
Location: Melbourne, Australia
Senior Member
I see where this is going....

Whiner: I want to go to London.
Helpful: Why don't you take a plane?
W: Too dangerous!

H: A boat?
W: I get seasick.

H: A train.
W: Too noisy.

H: A bus.
W: Too cramped.

H: Hey, why don't you walk?
W: Thats a great idea, thanks for your help.

So, to bypass a long to-and-fro of posts, why don't you hire a work-experience programmer to watch all of the rows being inserted into the table, match them up with table locks, sessions, and processes in the V$ views to find out who submitted the statement, and then phone them and tell them what the key was so that they can type it in to the front-end as input into the next step of the program.

Or, you could tell us why you are not using the obvious solution, and what are the features of an alternative solution that you would be prepared to use. http://www.orafaq.com/forum/fa/1620/0/

Ross Leishman

[Updated on: Mon, 23 October 2006 21:11]

Report message to a moderator

Previous Topic: package
Next Topic: oracle 10g purge all entries of a single table
Goto Forum:
  


Current Time: Thu Apr 25 12:44:02 CDT 2024