Courseiva

DP-900 Practice Question: Identify considerations for relational data on Azure

A company uses Azure SQL Database for a customer relationship management (CRM) application. The database has a table named Orders that stores order details. The company needs to ensure that the OrderDate column is automatically set to the current date and time when a new row is inserted, without any application-side logic. Which T-SQL construct should be used?

⚠ Common exam trap

DP-900 often tests the difference between constraints; candidates might confuse CHECK with DEFAULT, but CHECK validates data while DEFAULT provides a value.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

DEFAULT constraint with GETDATE()

A DEFAULT constraint with GETDATE() automatically inserts the current date and time into the OrderDate column when a new row is inserted and no value is specified. This is a server-side solution that requires no application logic, ensuring consistency and reducing code complexity.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    CHECK constraint

    Why it's wrong here

    A CHECK constraint validates values against a Boolean expression and cannot assign a value, so it never populates OrderDate. It is tempting because constraints enforce column rules automatically, and it would be correct for restricting OrderDate to a permitted range rather than generating the timestamp.

  • ✗

    UNIQUE constraint

    Why it's wrong here

    A UNIQUE constraint only prevents duplicate values in a column and cannot supply a value on insert. It is tempting because it is declared alongside the column definition, and it would be correct for guaranteeing distinct OrderDate values where duplicates are invalid, not for automatically setting the timestamp.

  • ✗

    PRIMARY KEY constraint

    Why it's wrong here

    A PRIMARY KEY constraint enforces uniqueness and non-nullability on identifying columns; it assigns no values. It is tempting because keys are defined on the table itself, and it would be correct for uniquely identifying each Orders row, not for defaulting OrderDate to the current date and time.

  • ✓

    DEFAULT constraint with GETDATE()

    Why this is correct

    A DEFAULT constraint with GETDATE() supplies the current date and time automatically at insert time, so the OrderDate column is populated server-side. This satisfies the requirement to avoid any application-side logic, since the value is generated by the database engine itself.

About these practice questions

This DP-900 question is part of Courseiva's 851-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

This DP-900 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-900 exam.