Microsoft Azure Data Fundamentals — Question 199

You have the following T-SQL statement.

SELECT o.OrderNo, o.OrderDate, c.Address, c.City

FROM Order AS o -

JOIN Customer AS c -
ON o.Customer = c.ID;

What is the function of the ON clause?

Answer options

Correct answer: B

Explanation

The ON clause is used to establish the relationship between the two tables by specifying how the records in the Customer table correspond to those in the Order table. Option A and D are incorrect because the ON clause does not modify any data. Option C is also wrong as it does not define an alias; the alias is defined in the FROM clause.