CREATE PROCEDURE `spDeleteOnlineMeetingAccount` ( IN `P_AccountId` INTEGER ) BEGIN IF EXISTS ( SELECT ? FROM `tonlinelecturemeetingaccount` WHERE `id` = `P_AccountId` ) THEN DELETE `tma` , `tls` FROM `tonlinelecturemeetingaccount` `tma` LEFT JOIN `tonlinelecturemeetingsettings` `tls` ON `tma` . `BatchId` = `tls` . `BatchId` WHERE `tma` . `Id` = `P_AccountId` ; COMMIT ; SELECT ? ; ELSE SELECT ? ; END IF ; END 