Dear Friends,
create or replace PROCEDURE "SP_INSERTG"
(
ID_ NUMBER,
NAME_ nvarchar2,
CDATE_ timestamp,
MDATE_ timestamp,
output out NUMBER
)
AS
BEGIN -- sub-block begins
--SAVEPOINT start_transaction; -- mark a savepoint
Insert into tbl_G (GID,NAME,DDATE,DSTATE,MODIFIEDDATE) values(ID_,NAME_,CDATE_,'0',MDATE_);
IF( SQL%ROWCOUNT >= 1 )-- its Return 0 or 1
THEN
output := 1; --Output 1
ELSE
output := 0;-- Output 0
END IF;
NULL;
END SP_INSERTG;
This is My StoredProcedure in Oracle iam new to Oracle in this Sp i want to handle the Exceptions and Roll back the Transcation.If any body having idea please share with me.
Regards,
AnilKumar.D