Hi,
The APEX built-in 'Return Key Into Item' function is great, but I'd like to use it manually. Is there a specific function it uses to do this?
To elaborate, I want to make a manual row processor from pl/sql code. I have a trigger that creates a primary key if my value is null, which is why I use the 'Return Key Into Item' function, however I would like to make this a manual thing in my own code. I would like to create a record, have that primary key generated, be able to capture the value of that primary key in a variable, and then continue my pl/sql code with the ability to refer to that primary key.
As a basic example:
Insert Into Employees (Name, Job) values ('Matthew', 'Astronaut'); -- This table also has Employee_PK, but left it out because my trigger will supply that value
-- Code to take the value of that Employee_PK and store it in variable primaryKeyValue
dbms_output.put_line(primaryKeyValue); -- I should get the value of the primary key in that newly created record
Any help is appreciated, thank you.
Matthew