About the Exam

This exam is for candidates who design and develop AI-enabled database solutions across Microsoft SQL Server, Azure SQL, and SQL databases in Microsoft Fabric. It covers designing database objects, securing, optimizing, and deploying database solutions, and implementing AI capabilities such as embeddings, vectors, and models. Passing demonstrates practical skill with T-SQL, CI/CD practices, and building robust SQL solutions that integrate AI features for modern enterprise applications.

Exam Topics

  • Design and develop database solutions35–40%
  • Secure, optimize, and deploy database solutions35–40%
  • Implement AI capabilities in database solutions25–30%

How to Use This Practice Exam

  1. Browse — Read each question, select your answer, and reveal the explanation.
  2. Exam Mode — Simulate real exam conditions with a timed session and score report.
  3. Learn Mode — Spaced repetition schedules questions you struggle with for long-term retention.

Download the Full Exam PDF

Get every question and answer in a clean, printable PDF built for offline study. Purchase once, keep permanent access, and re-download the latest version anytime.

Last updated July 17, 2026 at 10:01 AM

Topic filter
Retired questions
Question sort
Questions per page

QuestionQ1

Design and develop database solutions

You have an Azure SQL database containing these SQL graph tables:

  • A NODE table named dbo.Person
  • An EDGE table named dbo.Knows

Each row in dbo.Person contains these columns:

  • PersonID (int)
  • DisplayName (nvarchar(100))

You need to use a MATCH operator with exactly two directed Knows relationships to return the PersonID and DisplayName of people reachable from the person identified by an input parameter named @StartPersonId.

Which Transact-SQL query should you use?

Explanation

A directed SQL Graph pattern uses arrows to specify the traversal direction. The pattern p1-(k1)->p2-(k2)->p3 traverses exactly two directed Knows edges from the starting node p1 to p3; filtering p1.PersonID by @StartPersonId establishes the origin, and selecting p3.PersonID and p3.DisplayName returns the people reached after the second relationship. Microsoft documents that MATCH patterns traverse from one node to another through an edge in the arrow’s specified direction.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!

QuestionQ2

Secure, optimize, and deploy database solutions

You have an Azure SQL database that includes a column named Notes.

A security review finds that Notes contains sensitive data. You need to protect the data so that neither stored values nor query inputs disclose information about the actual data. The solution must prevent a user from inferring data relationships or repetitions from the encrypted output.

Which should you use?

Explanation

Always Encrypted with randomized encryption encrypts values and query parameters outside the database, and encrypts each occurrence of identical plaintext differently. This prevents encrypted output from revealing equality, repeated values, or relationships between plaintext values. Deterministic encryption intentionally produces matching ciphertext for matching plaintext and can therefore expose such patterns.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!

QuestionQ3

Secure, optimize, and deploy database solutions

You have a SQL database in Microsoft Fabric that includes the following functions:

  • A multi-statement table-valued function (TVF) named Sales.mstvf_OrderStatus() that returns order status information.
  • A scalar user-defined function (UDF) named dbo.ufn_GetTaxMultiplier (@TaxAmt money, @StateCode char(2)) that returns a numeric multiplier used in tax calculations.

Reporting queries frequently join Sales.mstvf_OrderStatus() to Sales.SalesOrderHeader and return large result sets. A performance review shows that the queries generate inconsistent execution plans.

During a code review, a developer finds that the following Transact-SQL statement produced an error:

EXEC @ret = ufn_GetTaxMultiplier @TaxAmt = 100.00, @StateCode = ‘WA’;  

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

Yes or No
StatementsYesNo
You can use GETDATE() in dbo.ufn_GetTaxMultiplier to produce nondeterministic results.
Rewriting Sales.mstvf_OrderStatus() as an inline table TVF will reduce the number of inconsistent execution plans.
Replacing ufn_GetTaxMultiplier with dbo.ufn_GetTaxMultiplier in the EXEC function statement will resolve the error.
Explanation

GETDATE() is a nondeterministic built-in function that is permitted in Transact-SQL UDFs. Multi-statement TVFs have no optimizer-created statistics for their output and use heuristic row estimates; an inline TVF is optimized as part of the calling query, avoiding that source of unstable plans. A scalar UDF invoked through EXEC must use a schema-qualified name, such as dbo.ufn_GetTaxMultiplier.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!

QuestionQ4

Secure, optimize, and deploy database solutions

You have an Azure SQL database that contains order data.

A reporting query that aggregates monthly revenue for each customer runs frequently. You need to reduce the time required to retrieve the computed values. The solution must not change any underlying table structure.

What should you do?

Explanation

An indexed view materializes the aggregation in a unique clustered index, which can reduce repeated computation of monthly revenue per customer. For an indexed view, the view must use WITH SCHEMABINDING; when its definition uses GROUP BY, it must also include COUNT_BIG(*). The unique clustered index is the initial index required to materialize the view.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!

QuestionQ5

Design and develop database solutions

You have a Microsoft SQL Server 2025 database containing a table named dbo.CustomerMessages. dbo.CustomerMessages has two columns: MessageID (int) and MessageRaw (nvarchar(max)).

MessageRaw can include a phone number in several formats, and some rows do not include a phone number.

Write one SELECT query that meets these requirements:

  • Return MessageID, RawNumber, DigitsOnly, and PhoneStatus.
  • RawNumber must contain the first substring that matches a phone-number pattern, or NULL when no match is found.
  • DigitsOnly must remove every non-digit character from RawNumber, or return NULL.
  • PhoneStatus must return Valid when MessageRaw contains a phone number; otherwise, it must return Missing.

Each value may be used once, more than once, or not at all.

Drag & Drop
SELECT
    MessageID,
    MessageRaw, '\d{3}[\.\-\s]\d{3}[\.\-\s]\d{4}') AS RawNumber,
    MessageRaw, '\d{3}[\.\-\s]\d{3}[\.\-\s]\d{4}'), '\D', '') AS DigitsOnly,
    CASE
        WHEN MessageRaw, '\d{3}[\.\-\s]\d{3}[\.\-\s]\d{4}') = 1
        THEN 'Valid'
        ELSE 'Missing'
    END AS PhoneStatus
FROM dbo.CustomerMessages;
Explanation

REGEXP_SUBSTR extracts the first substring matching the phone-number expression. REGEXP_REPLACE then replaces every non-digit (\D) in that substring with an empty string, preserving NULL if there was no match. REGEXP_LIKE returns the match Boolean value used to set the status to Valid or Missing.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!
Know a question that should be here? Contribute to this exam
Back home