I think my question title says all, but still let me explain.
When I was (SOQL) querying on Account object, I came across Account.Name which has dot (.) and AccountId without dot(.)notation. I was trying to give it a logic behind it.
My logic:
when account object was created, system(or Database) would auto generate the id for each record/object, so it wouldn't need Id. Hence we can directly call it as AccountID.
Well the question is, system also generates CreatedBy. In that case, I should be able to use AccountCreatedBy, Which clearly didn't work for me.
I'm so in love with this community. Thanks A Ton.
Best Answer
When you do a SOQL always the relationships are denoted by __r for custom objects while for standard objects its object Name usually.
Now lets say we have query on contact as below,
Another way to obtain AccountId will be as below