update SterilizationRecord set disinfectantAmount=(select count(ti.id) from TousseInstance ti join TousseDefinition td on td.id=ti.tousseDefinition_id where td.tousseType='消毒物品' and ti.sterilizationRecord_id=SterilizationRecord.id) where id in (select ti.sterilizationRecord_id from TousseInstance ti join TousseDefinition td on td.id=ti.tousseDefinition_id where td.tousseType='消毒物品' and ti.sterilizationRecord_id=SterilizationRecord.id);