Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Using RETURN in a Trigger
You didn't specify what database version you are using (a necessity for
posts here). Assuming you're on 8i or later you can use the RETURNING
clause of the statement that's _causing_ the trigger to fire.
INSERT INTO ...
RETURNING ... INTO ...
Richard
Moritz Klein wrote:
>
> Hi to everybody,
>
> I am new to this newsgroup so please don't hesitated to tell me about errors
> I do. I am german can speak English rather well but I am not that good in
> written English so please be kind. ;-)
>
> I am about to get a database working in which will be stored information
> about the shared folders and files within our local subnet. Do keep the
> query rate as low as possible we use a script which first collects every new
> folder and puts them all together in one update-query. Afterwards the same
> script should update the files-table with references to the folders. I wrote
> a sequence and a trigger so the auto increment is working. Now I want the
> trigger to return the ID and the Name of the currently inserted directory to
> get this information into an array and use it to reference the files. The
> problem is that Oracle keeps telling me I can't use return within triggers.
> I am stuck does anybody knows what to do?
>
> Any help would be appreciated.
>
> Regards Moritz
Received on Tue Dec 17 2002 - 18:48:34 CST