Insert a data entry in Oracle and return the id of the data entry:
/*
Create or replace procedure worktask_content_Insert
(
Theme varchar2,
Type varchar2,
Status varchar2,
Source varchar2,
Content varchar2,
Slave varchar2,
Progress varchar2,
Conversionschedule varchar2,
Meetingid varchar2,
Scheduleid varchar2,
Scale varchar2,
Liableperson varchar2,
Coadjutant varchar2,
Starttime varchar2,
Endtime varchar2,
Completiondate varchar2,
Beforestarttime varchar2,
Starttype varchar2,
Beforeendtime varchar2,
Endtype varchar2,
Revise varchar2,
Departmentstask varchar2,
Sontask varchar2,
Taskcoding varchar2,
Createid varchar2,
Libdeparid varchar2,
Fathertaskid varchar2,
Maxid out varchar2
)
As
Maxtaskid varchar2 (50 );
Begin
-- Insert data
Insert into worktask_content values (values, theme, type, status, source, content, slave, progress, conversionschedule, meetingid, scheduleid, scale, liableperson, coadjutant, starttime, endtime,
Completiondate, beforestarttime, starttype, beforeendtime, endtype, revise, departmentstask, sontask, taskcoding, createid, libdeparid, fathertaskid );
-- Find the maximum value
Select MAX (taskid) into maxtaskid from worktask_content;
Maxid: = maxtaskid;
-- Modify data
Update worktask_content set fathertaskid = maxtaskid where taskid = maxtaskid;
Commit;
Exception
When others then
Rollback;
End;
*/
/
-- Declare
-- B _id varchar (14 );
-- Begin
-- Worktask_content_Insert ('23', '1', '1', '1', '1', '1', '1', '1', '1', '1 ', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1 ', '1', '1', '1', '1', '1', '1', '1', '1', B _id );
-- Dbms_output.put_line (B _id );
-- End;
-- Select * from worktask_content
/