Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi,
I have a doubt in SOQL. Can we write join queries in SOQL? If it is possible please show me a sample query.
Thanks and Regards
Hari G S
Yes we can queries with join in salesforce.
Querying Childs with parents:
Select Id, Name, (Select Id, LastName from Contacts) from Account
Querying Childs based on parent records:
Select Id, LastName from Contact where AccountId IN (Select Id, Name from Account)
for more examples view:Relationship Queries
Yes we can queries with join in salesforce.
Querying Childs with parents:
Select Id, Name, (Select Id, LastName from Contacts) from Account
Querying Childs based on parent records:
Select Id, LastName from Contact where AccountId IN (Select Id, Name from Account)
for more examples view:Relationship Queries