Okay this is a basic question but want the best practice. If I have a FK ID field in my main query FROM table that joins to that PK table. I know it does not matter but best practice the ID field should that reference the main FROM table or the joined PF table. For example,
IV.InvoiceGroupID, --should this use the main table InvoiceGroupID or the IG table best practice
FROM Invoice IV
JOIN InvoiceGroup IG ON IV. InvoiceGroupID = IG.InvoiceGroupID
Also one other thing is the JOIN which table should always be the first in the ON statement? Sometimes I find myself mixing them.
Again all best practice I am looking for.