CREATE PROCEDURE `spAddOnlinelecture` ( IN `P_LectureId` INTEGER , IN `P_Date` DATE , IN `P_FromTime` TIME , IN `P_ToTime` TIME , IN `P_MeetingId` LONGTEXT , IN `P_TeacherId` INTEGER , IN `P_TimeTableId` INTEGER , IN `P_BatchId` INTEGER , IN `P_IsMeetingStarted` TINYINT , IN `P_MettingAccountId` INTEGER , IN `P_UserId` INTEGER , IN `P_MeetingPassword` LONGTEXT ) BEGIN DECLARE `l_LectureId` INTEGER DEFAULT ? ; IF `P_LectureId` = ? THEN INSERT INTO `vida_lms` . `tonlinelecture` ( `Date` , `FromTime` , `ToTime` , `MeetingId` , `TeacherId` , `TimeTableId` , `BatchId` , `IsMeetingStarted` , `MettingAccountId` , `CreatedDateTime` , `CreatedUserId` , `MeetingPassword` ) VALUES ( `P_Date` , `P_FromTime` , `P_ToTime` , `P_MeetingId` , `P_TeacherId` , `P_TimeTableId` , `P_BatchId` , `P_IsMeetingStarted` , `P_MettingAccountId` , NOW ( ) , `P_UserId` , `P_MeetingPassword` ) ; SET `l_LectureId` = `LAST_INSERT_ID` ( ) ; SELECT ? AS `StatusCode` , `l_LectureId` AS `LectureId` , `ifnull` ( `OL` . `MeetingId` , ? ) AS `MeetingId` , `ifnull` ( `OL` . `MeetingPassword` , ? ) AS `MeetingPassword` , `OLS` . 