Skip to content
datastudyguides

DP-600 · 2.2.1 · Prepare data

Reusable T-SQL objects

Create views, functions, and stored procedures

Use a view for a reusable query, an inline for a parameterized query, and a for multi-step data-changing logic.

The core idea

Comparison of SQL views, inline table-valued functions, stored procedures, and CTAS by parameters, returned rows, and ability to change data.

Choose the object by what the logic must do. A view is a saved SELECT with no parameters. An adds parameters while still returning rows from one SELECT.

A can run multiple statements and change data, so it suits repeatable load steps.

is different: it materializes a new table from a query result instead of storing reusable query logic.

Key points

  • View: saved SELECT, queried like a table
  • : parameterized SELECT returning rows
  • Procedure: multiple statements executed with EXEC
  • : stores a physical snapshot table

Click an underlined term for a one-line explanation, or see them all in the glossary .

Exam trap

A view cannot accept parameters. Use an when reusable row-returning logic needs parameters.

Sources · 4 Microsoft Learn pages Show ▾

Checked on October 4, 2026. Report a problem

Go deeper on Microsoft Learn

Checked against Microsoft Learn on October 4, 2026. Report a problem with this card

How well do you know this?