CREATE PROCEDURE `spGetBankDetails` ( IN `P_TeacherId` INTEGER , IN `P_AccountId` INTEGER ) BEGIN SELECT `Id` AS `AccountId` , `TeacherId` , `AccountHolderName` , `AccountNumber` , `IFSCCode` , `EmailId` FROM `tbankaccountdetail` WHERE ( `TeacherId` = `P_TeacherId` OR `P_TeacherId` = ? ) AND ( `Id` = `P_AccountId` OR `P_AccountId` = ? ) ; END 