I want to join 2 tables in a SOQL query. I looked at QueryResult but think it might be a red herring. Difficult to tell from the documentation.
I have a lookup field between table CustomObj and Event. Assuming I have a relationship called Events can I do something like this?
List<CustomObj__c> objects = [Select Id, Name, (Select Id, DataField__c From Events) From CustomObj__c];
If this works how do I access the fields from the sub query? i.e. can I do this?
What happens if the field name of the out query match the field names of the inner query?
Is it easier to forget the join altogether and do 2 queries?