nerdexam
Microsoft

AI-102 · Question #127

You have a SQL query that combines customer data and order data. The query includes calculated columns. You need to create a database object that would allow other users to rerun the same SOL query. W

The correct answer is B. a view. To allow other users to repeatedly execute a specific SQL query that combines data and includes calculated columns, you should create a view.

Submitted by yaw92· Mar 30, 2026

Question

You have a SQL query that combines customer data and order data. The query includes calculated columns. You need to create a database object that would allow other users to rerun the same SOL query. What should you create?

Options

  • Aan Index
  • Ba view
  • Ca scalar function
  • Da table

How the community answered

(36 responses)
  • A
    11% (4)
  • B
    81% (29)
  • C
    6% (2)
  • D
    3% (1)

Why each option

To allow other users to repeatedly execute a specific SQL query that combines data and includes calculated columns, you should create a view.

Aan Index

An index is a performance optimization object used to speed up data retrieval, but it does not store or encapsulate a SQL query that returns data.

Ba viewCorrect

A view is a virtual table that encapsulates a SQL query, including joins and calculated columns; users can then query the view directly, which re-executes the underlying SQL query to present the result set.

Ca scalar function

A scalar function returns a single value and is used for specific calculations, not for encapsulating and rerunning a complete query that returns a result set.

Da table

A table is used to store raw data; it does not define or encapsulate a pre-defined query with combined data and calculated columns.

Concept tested: SQL database views

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

Topics

#SQL views#Database objects#SQL queries

Community Discussion

No community discussion yet for this question.

Full AI-102 Practice