Reputation: 429
In the w3school tutorial for the SQL "JOIN command", the given example is:
SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
FROM Orders
INNER JOIN Customers
ON Orders.CustomerID=Customers.CustomerID;
My question is what does the dots mean in Orders.OrderID
, Customers.CustomerName
, Orders.OrderDate
and so on?
Upvotes: 2
Views: 5209
Reputation: 51
in this case: Orders.OrderID the OrderID is a column in Orders table. lets asume, that OrderID is a column in Customers table, you must define from which table you wish to get the OrderID column
Upvotes: 2
Reputation: 4464
In this particular example it separates table name with column name. It helps when two or more tables have columns with the same name.
Upvotes: 3
Reputation: 28500
In this case:
TableName.Column
You might also see aliases
e.g.
SELECT a.column1, b.column2
FROM Table1 AS a
JOIN Table2 AS b
Upvotes: 1