Unanswered: Stored procedure return primary key of inserted row ?
Hello guys, I want a stored procedure to return the primary key of the new record after it gets executed. I think it will be returned by OUT parameter in the procedure. But how to select the newly inserted row ID ? I don't want to use select MAX(row_id) as it is a multi user environment. Any procedure sample will be appreciated.
The row id Column is not an identity column. It uses a sequence for the key which gets generated via a trigger before insert on table.