You need to sign in to do that
Don't have an account?
Difference between Contact And Contacts
[select id,name,(select name,AccountId from Contacts) from Account where id in(select AccountId from Contact)]
In this SOQL query,What's the difference between Contacts and Contact.I didn't get this relationship.
Please give a hand.
In this SOQL query,What's the difference between Contacts and Contact.I didn't get this relationship.
Please give a hand.
In the second query, you are querying all Contacts and you're directly fetching them from Contact object, unlike, how you did it in the first query.
Contact = sObject Contact.
Contacts = relationship name for object Contact on Account.
As verbs the difference between contacts and contact is that contacts is (contact) while contact is to touch; to come into physical contact with. https://www.mymorri.net/
So by using an object's child relationship name you can query this object's record which are related to your parent record directly by running the query on Parent Object.
Mark this answer as Best if this helps you.
Thanks & Regards,
Tushar Mathur