📅  最后修改于: 2022-03-11 14:57:25.230000             🧑  作者: Mango
for(University__c u: [select Name,(select Name from colleges__r) from university__c])
{
for(College__c c:u.Colleges__r)
System.debug('University Name:'+u.Name+' College Name:'+c.Name);
}