function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kabukabu 

query join with criteria matching 2 different custom objects

Hi I have 2 different custom objects with field values same in both objects and wanted to query matching records. Also wanted to query records from both objects.
in sql I write like this
(SELECT Ord.OrderID__c, Cust.CustomerName__c, Ord.OrderDate__c
FROM Orders__c  Ord
INNER JOIN Customers__c  cust
ON Ord.CustomerID__c=Cust.CustomerID__c)

Please let me know how can I write in soql.

thanks in advance.