CREATE PROCEDURE `spGetDoubtSession` ( IN `P_TimeTableId` VARCHARACTER (?) ) BEGIN SELECT `Id` AS `TimeTableId` , CAST ( `ttimetable` . `FromTime` AS CHARACTER ) AS `FromTime` , CAST ( `ttimetable` . `ToTime` AS CHARACTER ) AS `ToTime` , CAST ( `ttimetable` . `FromDate` AS CHARACTER ) AS `FromDate` , `Title` , SUBJECT , `IsSession` , `AnouncementMessage` , `BatchId` FROM `ttimetable` WHERE ( `FIND_IN_SET` ( `Id` , `P_TimeTableId` ) OR `IFNULL` ( `P_TimeTableId` , ? ) = ? OR `P_TimeTableId` = ? ) AND `IsSession` = ? ; END 