nerdexam
Microsoft

70-465 · Question #167

You have a database that contains a table named Customers. You need to retrieve a set of customers by using multiple nested SELECT statements. The solution must meet the following requirements…

The correct answer is B. A view. To retrieve a reusable set of customers that can be directly referenced in a FROM statement for nested SELECT queries, a view is the appropriate solution.

Submitted by saadiq_pk· Mar 5, 2026Design and implement database solutions for SQL Server

Question

You have a database that contains a table named Customers. You need to retrieve a set of customers by using multiple nested SELECT statements. The solution must meet the following requirements: ---- The result can be used in a FROM statement ---- The result must be reusable. What should you use to retrieve the set of customers?

Options

  • AA CLR stored procedure
  • BA view
  • CAn unsigned store procedure
  • DA scalar function

How the community answered

(46 responses)
  • A
    2% (1)
  • B
    87% (40)
  • C
    4% (2)
  • D
    7% (3)

Why each option

To retrieve a reusable set of customers that can be directly referenced in a FROM statement for nested SELECT queries, a view is the appropriate solution.

AA CLR stored procedure

A CLR stored procedure executes custom code and returns a result set, but it cannot be directly used in a FROM clause as a table-like object for nested queries.

BA viewCorrect

A view is a virtual table whose content is defined by a query, allowing it to encapsulate complex queries. This virtual table can then be referenced directly in the FROM clause of other SELECT statements, fulfilling both the requirement for reusability and the ability to be used in a FROM clause.

CAn unsigned store procedure

An 'unsigned stored procedure' is not a standard SQL Server construct; regular stored procedures, like CLR ones, are primarily for execution and do not directly satisfy the requirement of being usable in a FROM clause as a reusable table for nested SELECTs.

DA scalar function

A scalar function returns a single atomic value, not a 'set of customers' (a table) which is required for use in a FROM statement for nested SELECTs.

Concept tested: SQL Server Views for data abstraction and reusability

Source: https://learn.microsoft.com/en-us/sql/relational-databases/views/views?view=sql-server-ver16

Topics

#Views#Reusable queries#Database objects

Community Discussion

No community discussion yet for this question.

Full 70-465 Practice