CREATE PROCEDURE `spClassListGet` ( IN `P_TeacherId` INTEGER ) BEGIN SELECT `tsubcategorymaster` . `Id` AS `SubCategoryId` , `tsubcategorymaster` . `Code` AS `SubCategoryName` FROM `tsubcategorymaster` INNER JOIN `tteacher` ON `tsubcategorymaster` . `Id` = `tteacher` . `SubcategoryIds` WHERE `tteacher` . `Id` = `P_TeacherId` ; END 