Great! In the previous example, we provided column names together with the tables they belong to. This is good practice, but you only need to do it when there is potential for ambiguity. If there are two different columns with the same name in two different tables, then you have to specify the table names. If the names of the columns are unique, though, you may omit the table names.
ON Person.Id = OwnerId;
In this case, there is only one column named
Name and only one column named
Model in the tables
Car, so we could provide their names without giving information about the tables they come from. Similarly, there is only one column named
OwnerId – it is only in the
Car table, so we can omit the name of the table.
When we refer to
Id column of the
Person table, though, we must write the table name as well (
Person.Id) because there is another column with the name
Id in the