IT Certifications · 70-762

Exam 70-762: Developing SQL Databases Practice Test

Exam 70-762 focuses on developing relational databases with SQL Server and T-SQL. Its subject matter includes defining database objects, writing queries, and building stored procedures that return useful results to applications. The available practice material samples query and index choices, data types, views, stored-procedure outputs, and basic database consistency checks.

Exam overview

Exam providerMicrosoft
Exam code70-762
CategoryIT Certifications

About the Exam 70-762: Developing SQL Databases Exam

Database development requires translating data needs into schemas and queries that behave predictably as tables grow. Work can involve selecting columns and data types, defining reusable views, and writing T-SQL that filters, orders, and limits result sets. Query performance depends on matching index keys to access patterns and writing predicates that can use indexes effectively. Stored procedures may return rows or communicate a compact status to a caller, so choosing the right output mechanism matters. Developers also need to distinguish valid, false, and unknown values when modeling nullable flags, and to recognize commands used to inspect database consistency. The practice bank provides examples in these areas, but its questions are a sample of SQL development concepts rather than a statement of official topic coverage.

Sample Practice Questions

Review a selection from this exam's published US Practice Tests practice bank.

Question 1

A database contains a large table, and a query repeatedly needs rows ordered by `CreatedAt` while returning only the most recent few rows. Which index key order is generally most useful for this access pattern?

  1. AAn index on `CreatedAt DESC`
  2. BAn index on an unrelated text column
  3. CAn index on `CreatedAt` included only as a non-key column
  4. DNo index, because indexes cannot support ordering
Show answerCorrect answer: A

An index ordered by `CreatedAt` can provide rows in the requested order and help SQL Server retrieve the newest rows without sorting the entire qualifying set. An included column is stored at the leaf level but does not provide index key ordering.

Question 2

A stored procedure needs to return a status code to its caller indicating whether a validation succeeded. Which mechanism is intended for returning a small integer status from a procedure?

  1. AA RETURN statement with an integer value
  2. BA SELECT statement that returns a row containing the status
  3. CA PRINT statement containing the status
  4. DA DEFAULT constraint on the procedure parameter
Show answerCorrect answer: A

A stored procedure can use RETURN with an integer to provide a return status. SELECT returns a result set, and PRINT emits a message; neither is the procedure's integer return status. Output parameters are another option when returning values beyond a simple status code.

Question 3

A query plan shows a table scan because a predicate applies a function to an indexed column, such as `YEAR(OrderDate) = 2024`. Which rewrite is generally more likely to allow an index seek on `OrderDate`?

  1. AUse a date range: `OrderDate >= '20240101' AND OrderDate < '20250101'`
  2. BWrap `OrderDate` in a different function
  3. CConvert every stored date to text before comparing
  4. DAdd `DISTINCT` to the query
Show answerCorrect answer: A

A range predicate that compares the indexed column directly is generally SARGable, allowing SQL Server to consider an index seek. Applying a function to the column can make that access less usable for a seek.

Question 4

A table stores a small fixed set of independent Boolean-like flags, each of which may be unknown. Which SQL Server data type is designed to represent true, false, or unknown?

  1. ABIT
  2. BTINYINT
  3. CUNIQUEIDENTIFIER
  4. DDATE
Show answerCorrect answer: A

SQL Server's BIT type stores 0, 1, or NULL, which can represent false, true, or unknown when the column permits NULL. TINYINT stores a broader numeric range and is not the dedicated Boolean-like type.

Question 5

A team wants a reusable named query definition that can be referenced in SELECT statements and does not itself store a separate copy of the query's rows. Which database object fits this need?

  1. AView
  2. BTable variable
  3. CSequence
  4. DDatabase role
Show answerCorrect answer: A

A standard view stores a query definition and exposes its results when queried; it does not store a separate copy of the result rows. A table variable stores rows for a session or batch, while a sequence generates numeric values and a role groups permissions.

Question 6

A query frequently filters rows using `WHERE Status = 'Open'`. Which index design is generally most useful for this filter when the table has many rows?

  1. AA nonclustered index with Status as its key
  2. BA CHECK constraint on Status
  3. CA view that selects all rows
  4. DA default value for Status
Show answerCorrect answer: A

An index keyed on Status can help SQL Server locate rows matching the predicate without scanning every row, depending on selectivity and the overall query plan.

Question 7

A query needs to list all distinct `Region` values from a table, excluding duplicates. Which SELECT clause provides that result?

  1. AGROUP BY Region
  2. BDISTINCT
  3. CORDER BY Region
  4. DTOP (1)
Show answerCorrect answer: B

`SELECT DISTINCT Region` removes duplicate result values. `ORDER BY` sorts rows, and `TOP` limits the number of rows; neither by itself removes duplicates. `GROUP BY` can also produce distinct grouping values, but DISTINCT directly expresses this requirement.

How to use this practice test

The free practice session draws up to 20 random questions from the available 50-question bank. Answer the questions, then use the session results to identify which SQL concepts need more attention, such as index selection, predicate rewrites, T-SQL result handling, or database objects.

Preparation tips

  • Compare index key order with query filters and sort requirements, especially when a query returns only the newest rows.
  • Rewrite predicates that apply functions to indexed columns as equivalent range conditions, then consider whether the form can support an index seek.
  • Practice distinguishing stored-procedure result sets, output parameters, and integer return codes.
  • Review how views, DISTINCT, TOP, nullable BIT values, and DBCC CHECKDB address different SQL Server tasks.
Official sourceOfficial exam page ↗