I want to return the AutoID when inserting new row in the table using stored procedure. Below is the stored procedure, based on where clause i get rows and then insert same rows in the table with new ID; I need this new ID.
create or replace PROCEDURE duplicate_ticket
(
i_RowID IN Varchar2
)AS
BEGIN
INSERT INTO main_table (
programname,
partnumber
)
SELECT
programname,
partnumber
FROM
main_table
WHERE id = i_RowID;
END duplicate_ticket;
I even tried the below reference but it did not work oracle procedure returns integer
Thanks