nerdexam
Microsoft

DP-900 · Question #305

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?

The correct answer is B. to match data in the Customer table to data in the Order table. The ON clause in a SQL JOIN specifies the condition used to match rows between two tables. It defines the relationship between the joined tables.

Submitted by hassan_iq· Mar 30, 2026Identify considerations for relational data on Azure

Question

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?

Options

  • Ato update data in the Customer table
  • Bto match data in the Customer table to data in the Order table
  • Cto define an alias for the Customer table
  • Dto update data in the Order table

How the community answered

(33 responses)
  • A
    3% (1)
  • B
    88% (29)
  • C
    3% (1)
  • D
    6% (2)

Why each option

The ON clause in a SQL JOIN specifies the condition used to match rows between two tables. It defines the relationship between the joined tables.

Ato update data in the Customer table

The ON clause does not modify data; it is part of a SELECT statement's JOIN syntax and only evaluates a match condition - no DML operation occurs.

Bto match data in the Customer table to data in the Order tableCorrect

The ON clause specifies the join predicate that links rows from the Order table to rows in the Customer table. Here, it matches Order.Customer (foreign key) to Customer.ID (primary key), telling the database engine which rows from each table belong together in the result set.

Cto define an alias for the Customer table

Table aliases are defined using the AS keyword directly after the table name in the FROM or JOIN clause, not within the ON clause.

Dto update data in the Order table

The ON clause performs no data modification on the Order table; it solely evaluates a Boolean condition to determine which rows to combine.

Concept tested: SQL JOIN ON clause join predicate

Source: https://learn.microsoft.com/en-us/sql/t-sql/queries/from-transact-sql

Topics

#SQL JOIN#ON clause#T-SQL#relational queries

Community Discussion

No community discussion yet for this question.

Full DP-900 Practice