CREATE PROCEDURE `spAddQuestionSubmit` ( `P_QuestionId` INTEGER , `P_IsSubmitted` BIT ) BEGIN IF EXISTS ( SELECT ? FROM `tetestquestions` WHERE `Id` = `P_QuestionId` ) THEN UPDATE `tetestquestions` SET `IsSubmitted` = `P_IsSubmitted` WHERE `Id` = `P_QuestionId` ; SELECT ? AS `Result` ; ELSE SELECT ? AS `Result` ; END IF ; END 