CREATE PROCEDURE `spCreateComment` ( IN `P_RefferenceCommentId` INTEGER , IN `P_UserId` INTEGER , IN `P_RoleTypeId` INTEGER , IN `P_AssignContentId` INTEGER , IN `P_CommentMessage` VARCHARACTER (?) ) BEGIN START TRANSACTION ; INSERT INTO `tstudymaterialcomment` ( `ReferenceCommentId` , `UserId` , `RoleTypeId` , `AssignContentId` , `CommentDetail` , `CreatedDateTime` ) VALUES ( `P_RefferenceCommentId` , `P_UserId` , `P_RoleTypeId` , `P_AssignContentId` , `P_CommentMessage` , NOW ( ) ) ; SELECT `LAST_INSERT_ID` ( ) ; COMMIT ; END 