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 -> Procedure which returns a key value

Procedure which returns a key value

From: M.Weiss <m.weiss_at_gmx.net>
Date: Wed, 16 Jun 1999 20:18:43 +0200
Message-ID: <7k8q8b$lne$1@news.rz.uni-karlsruhe.de>


Hi there,

I want to realize a function which shall act as follows:

I've got a table locks having two columns:
- iLockId integer PRIMARY KEY

In addition there is a "on insert"-trigger running which creates the primary key value iLockId when inserting a new row. Now, when calling the function, for example setLock('Any Comment'), the value 'Any Comment' shall be inserted into the table locks. So far it's no problem, just a simple insert-statement, the trigger does the rest and counts up the key value iLockId. Finally now, the function shall return the created value iLockId, and there's the problem. How can I grab this value, which is created by the trigger ?

I'll appreciate any hint ...

Thanks and regards
Marcus Received on Wed Jun 16 1999 - 13:18:43 CDT

Original text of this message

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